Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








TextArea Component


Hi,
I was just wondering if it is possible to load a .txt file into a TextArea component? I 've tried this:

Code:
loadtextContent = new LoadVars();

loadtextContent.load("Bio.txt");

this.BioText.text = loadtextContent;
but it doesn't work. Could anyone help?

Thanks
Jay




FlashKit > Flash Help > Flash ActionScript
Posted on: 09-18-2005, 12:55 PM


View Complete Forum Thread with Replies

Sponsored Links:

Help With TextArea Component Calling Javascript From Link In TextArea
Can anyone help me?
I have a TextArea Component that gets populated from a XML. I have the text with links and I want to be able to click on the link and call my javascript on my page. Can I do this? of what will I need to do to accomplish this. if you can provide an example that would be great.
Thanks in advanced

View Replies !    View Related
Content To Appear In Textarea Component Based Off Of ComboBox Component Selection?
Hello all:

I have a comboBox component with different values like so:

1-10
11-19
ETC.

Depending on what value is chosen from the comboBox, a certain value needs to appear in the text area. Do I need to use a listener for this? If not, any input would be appreciated. Thanks!

JPearson311

View Replies !    View Related
TextArea Component
I was able to disable the borders of the textArea component using the
following action script

textArea.setStyle("borderStyle", "none");

But this created a new problem. Now when I select the text or hi the
scroll bar I get agreen "glow" or highlite where the borders would be.

Anybody have any suggestions


...may you see that on http://www.agenciax.com/clientes/lima_netto/ , when this load click on "escritorio" button on top menu in portuguese version.

View Replies !    View Related
Textarea Component Help
is it possible to make the background transparent?

View Replies !    View Related
TextArea Component
I have a dynamic textArea component. When I load new text into it, the scrollbar stays where-ever it was last positioned - is there a way to make it return to the top everytime? Does it ususally return to the top for everyone else?

Thanks
Jessica

View Replies !    View Related
Textarea Component
Hi

I have a movie that contains a textarea component. I am loadind in text from a database via php.

If I run the movie on its own it works perfect. But if I load it into an empty movie clip or a level the scroll bar goes erratic and for some reason when you click on the scroll bar the text inside gets selected.

I have tried to use a plain textbox but cannot get the text formatted using html as with the textarea, code below.

var lv = new LoadVars();
lv.onLoad = function(ok) {
if (ok) {
var i = 0;
while (this["id" + i] != undefined) {
noticeboard_txt.text +="<br><br><br><b><u>"+this["titles"+i]+"</u><br><br></b>" +this["news"+i]+"<br>" +"<b>"+this["author"+i]+"<br>"+this["date"+i];

i++
}
}
}
lv.load("noticeboard.php");
// Make background color transparent
noticeboard_txt.depthChild0._alpha=0

Thanks for any help.

View Replies !    View Related
TextArea Component Help
Don't know how to insert line break in 'text' field of 'Parameters'.

View Replies !    View Related
TextArea Component In _mc
Is there an issue with using a textArea or textInput within a movie clip?

i am placing a textArea onto the stage of a mc (which is then placed on the timline of my scene )and then trying to import text from a *.txt file into it. I have tried various actionscript codes with both plain text (not favoured) html text and XML text files (preffered as I wish to formatt the text) without any luck.

I debug the actionscripts without any errors being generated but the text will not appear in the textArea component...or the component even be viewed when the movie is tested or previewed in a browser???

complete newbie so be gentle please

View Replies !    View Related
TextArea Component
I just noticed this is a similar title to another post I made, but rest assured the content is different.

If you go to:

http://www.westerndaytraders.com

You can see that there is a Flash TextArea component that is fetching posts from the Forum (through XML formatted by PHP). To view the XML that Flash is using, go here and view source. Perfectly formatted XML.

Now, as you probably noticed from the main page, the formatting in the news box is way off. The paragraph spacing more specifically is more than double what it should be. If you look on the forum in the 'news' section, you can view the post and see that it is formatted properly.

If anyone has some insight, please let me know.

Oh, before I forget, here is the code on the TextArea (well, not on it, but pertaining to it):


PHP Code:



txtShows.setStyle("borderStyle", "none");
txtShows.setStyle("scrollTrackColor", "0xFCF69A");
txtShows.setStyle("buttonColor", "0xFCF69A");
txtShows.html = true;


//LOAD THE XML DOCUMENT FOR NEWS
_root.onLoad = load_xml();

function load_xml() {
    System.useCodepage = true;
    myXML = new XML();
    myXML.ignoreWhite = true;
    myXML.onLoad = function(success) {
        //CALL SHOW_NEWS FUNCTION
        show_shows();
    };
    //LOCATION OF XML DOC
    myXML.load("admin/news_puller.php");
}


function show_shows() {
    for(var i=0; i<myXML.firstChild.childNodes.length; i++) {
    //RENAME CHILDNODES WITH VARIABLES
    date = myXML.firstChild.childNodes[i].childNodes[0].firstChild;
    subject = myXML.firstChild.childNodes[i].childNodes[1].firstChild;
    user = myXML.firstChild.childNodes[i].childNodes[2].firstChild;
    userurl = myXML.firstChild.childNodes[i].childNodes[3].firstChild;
    news = myXML.firstChild.childNodes[i].childNodes[4].firstChild;
    comments = myXML.firstChild.childNodes[i].childNodes[5].firstChild;
    url = myXML.firstChild.childNodes[i].childNodes[6].firstChild;

    //EMBED XML INFO INTO NEWS_CONTENT TEXT AREA
    txtShows.text += "<font family='verdana' size='12pt'><b>"+subject+"</b></font><font size='10pt'><br>Posted By </font><font color='#336699' size='10pt' family='verdana'><u><a href='"+userurl+"' target='_blank'>"+user+"</a></u></font><font family='verdana' size='10pt'> on "+date+"</font><br><font family='verdana' size='13pt'><pre>"+news+"</pre></font><br><font color='#336699' size='10pt' family='verdana'><u><a href='"+url+"' target='_parent'>"+comments+"</a></u></font><br><br>";
    }
    }

View Replies !    View Related
[F8] Please Help W/ TextArea Component
i've searched this forum but cannot seem to find a relevant solution to customize the textArea's scroll bar.

any tutorials on how to customize the textArea's scroll bar will be greatly appreciated.

thank you

View Replies !    View Related
TextArea Component
Hi,

I have used TextArea component in flash (mx/2004) by using built in components of flash. I have set html to true for the html text to be displayed by XML. But I think only some of the tags are supported with this component. Tags like table and other supporting tags are not displayed properly in textArea component. Then what could be the solution for the same.

I have tried to put the following text -

my_textArea.text ="<table border='2' cellspacing='5' cellpadding='5'><tr><td>first</td><td>second</td></tr></table>"

but table with border is not diplayed at all. Kindly help me in the same as early as possible.

Thanks in advance,
Shreeram

View Replies !    View Related
TextArea Component CS3
I've searched the net, joined Safaribooksonline, bought Colin Moocks Essential Actionscript 3.0 & Actio0nscript 3.0 cookbook and nowhere can I find out how to apply an imported css stylesheet to a CS3 TextArea component. I used to do this all the time in AS2 and it worked a treat. The only help I can find in the CS3 authoring tool and in live docs relates to AS2 which causes errors in my AS3 class. I'm building a custom TextAreaManager class for my general use. If anyone knows how to do it please let me know.
Thanks
Dave Towers

View Replies !    View Related
TextArea Component AS3
I'm having trouble both working out or finding out how to apply an imported css file to the CS3 TextArea component. I've frequently done this in AS2 using Flash 8, but that code no longer works. If anyone knows could you please let me know. Here's the AS2 code I've used previously:

private function loadCss(){
var myStyle = new TextField.StyleSheet();
myStyle.load(this.CssPath+".css"); // the CssPath variable here was supplied within an object passed through to the constructor
textArea.styleSheet = myStyle;
loadXml();
}

View Replies !    View Related
TextArea Component
Is it possible to use a TextFormat object to set the text format of a text area component? Thanks .

View Replies !    View Related
TextArea Component
Hi, how can I change the enable chars of a TextArea Component?
Thx!

View Replies !    View Related
TextArea Component
I have inserted a TextArea component and i can add text normally by changing it in the parameters tab. but i was wondering if anyone knew the code so i can make it show and input text field ? (call a .txt file in to the TextArea component) is this possible if so can u please show me the script thanks alot. Jimmy

View Replies !    View Related
TextArea Component Help
Hello, I'm importing text into a TextArea component and it all works fine and dandy. Though I want the textarea to not form a scrollbar but to actually just keep adjusting its height so there is never a scrollbar. I looked through all the properties and I have no idea what to test for to see if there is a scrollbar.
can anyone help?

View Replies !    View Related
TextArea Component
Last edited by swaze : 2006-01-28 at 10:10.
























I have two TextArea's in a movie, they're both attached to the same style sheet. Why does one work and one not? The TextArea for the FAQ's (link at the bottom of the screen) works. But the CSS for the TextArea on the 'About Us' page does not work. They both use the exact same code to link to the CSS.

This is the About page:

myStyle = new TextField.StyleSheet();
myStyle.load("flash/msjenkins.css");
_root.yellow.About.styleSheet = myStyle;

This is the FAQ page:

myStyle = new TextField.StyleSheet();
myStyle.load("flash/msjenkins.css");
_root.faqf.TextHolder.styleSheet = myStyle;

Does anyone know why the About page wouldn't work?

View Replies !    View Related
UI Component TextArea And CSS
Hi There

Does anybody know, if I can use CSS in the TextArea Component?
If yes, how?
I know that this should work with TextField, but I prefer the TextArea Component because of the scrollbar stuff.

Cheers

}-^°>

View Replies !    View Related
MX2004 + TextArea Component
I've got a flash animation where i load text in from a txtfile by using

"loadVariables("part1.txt", "_root");"

it works when i put it into a dynamic text box... but unfortunately it has more text than can fit, so i need a scroller... HOW CAN I USE the "TEXTAREA" component to read in information from a text File...


PLEASE HELP... THIS IS URGENT

View Replies !    View Related
TextArea Component Fontsize
How can i set the font size of one single component like the textarea
component ?

I can't seem to set the font size

With globalstyle i can but then all components get that size


thanx in advange...

Assenoost

View Replies !    View Related
Flashmx2004 Textarea Component
Hi,

I am using the textarea component, where you put text into the box with myTextArea.text ="blah" this works fine but I want to put the contents of a text file into the textarea.

I have a text file with htmlTXT= blahhh which loads fine into a standard text box from the flash toolbar when i have defined a variable for it to contain with the same htmlTXT name.

So the question is how do I load this variable so I can put it inside the textarea component, I have tried but keep getting undefined in the text area.

liam (tearing my hair out)

View Replies !    View Related
MX 2004 TextArea Component
Does anyone know how to load an external .txt or .html file into the textArea component found in Flash MX 2004, or do I have to load it into a Dynamic Text Box?

View Replies !    View Related
TextArea Component Characters?
I'm using MX 2004 Pro. How can I set the characters that are displayed in a text area component? I have some text loaded in dynamically but special characters like % don't show up. Any ideas?

View Replies !    View Related
Loading PHP Into A TextArea Component
Ok I've made a working blog using PHP, MySQL, and Flash MX 04 Pro. Right now my blog displays in a dynamic text box with the var "content". I would like to make it appear in a textArea component because then in the future I'll be able to upload pictures and .swf's for display inside my blog. Can anyone help me figure out how to display the information in a textArea component? I would greatly appreciate it.
I've attached a zip with all the necessary files, including the dump SQL for the database if you want to use it. Thanks all.

View Replies !    View Related
TextArea Component Gone Berserk
Ok I've got a textArea component on the stage. I have a PHP script that returns data from a MySQL database formated and sent to Flash as the variable "content". I couldn't figure out how to assign a textArea a variable name, unfortunately it's not as easy as with a dynamic text field, so I created my loadVars function and pointed it at the instance of my textArea component. For the first time it worked....sort of. I can see the text but there's all sorts of symbols breaking it up and screwing up the format. Check out what I mean....Blog . Anyone know how to make this work? Here's a link to my site where you can download all the necessary files to work with, I couldn't attach them cause they were too big.download link

View Replies !    View Related
TextArea Component: Border
Using FLASH MX PRO 2004

ok i've figured out how to change the backround color, and change the text color (using CSS) with this component...

now how do I change the color of the BORDER around the text?? or take it off even??

i've tried the help files within flash
(textArea.border= "false")
and all variations of this!
textArea.setStyle("borderColor", "black");
and all variations of this as well...

i can't figure this out, somebody help me out.

thanks

View Replies !    View Related
TextArea Component Question
How do I make the background transparent? I know that if type in myTA._alpha=0 it'll make it transparent but then the scroll bar disappears too.

View Replies !    View Related
Textarea Component Problems
Hi there,

I've just made the switch to MX 2004 and so far I'm distinctly underwhelmed by the new version; within minutes I have run into problems with the new v2 textarea component.

My problem is this:
I'm having trouble embedding fonts for the textarea component in my movie. Does amyone know how to do this? (And not embedding fonts for ordinary textfields as that is simple in properties or actionscript)

To give some context this is what I'm building:
I'm building a Q&A app which loads questions from an XML doc, these questions contain very basic html formatting (bold, italic, paragraph).

I built the original version of my app in MX. In MX I had multi-line textfields with scrollbars attached, fonts (verdana) embeded turned on and unused blank textfields off stage to embed bold and italic versions of the font. The result of this was a textfield with anti-aliased verdana text and html formating.

It is this that I want to re-create in MX 2004 with textarea component.

Any help would be much appreciated.

View Replies !    View Related
MX 2004 TextArea Component
I'm pulling in some XML to appear in the MX 2004 textArea component. No problems there. What I need to know is how to make the text in the component appeare as embeded font outlines (softer rather than sharp, like it does in a static text box). I've tried using actionscript to define the components style, but no dice on the font outlines.

Any ideas?

View Replies !    View Related
TextArea Component Problem
Hi,

Flash MX 2004. Using the TextArea component looked simple enough yet I'm having a problem with this. If I create a new movie, place an instance of the TextArea on the stage, name the instance "Comments" then in the properties inspector enter some text in the "text" field (Parameters) - then preview it, everything works.

But when I do this again and place the TextArea inside an MC, then preview my file, it dissapears...... What am I doing wrong?

Please help,

Thanks

:-)

Luke

View Replies !    View Related
TextArea Component Question
I have a TextArea component loading external text:


Code:
description.textField.selectable = false

description.setStyle("borderStyle", "none");

description.depthChild0._alpha = 0;

myStyle = new TextField.StyleSheet();
myStyle.load("port/home_work/hometext.css");
this.description.styleSheet = myStyle;
thisText = new LoadVars();
thisText.load("port/home_work/hometext1.txt");
thisText.onLoad = function(success)
{
if(success)
{
description.text = thisText.myText;
}
}


Is there a way to turn off the thin green line that appears when the TextArea is clicked on and becomes in focus? Not sure why the TextArea is still able to be selected since the "selectable = false" code exists.

Thanks much!

View Replies !    View Related
Flash Textarea Component Help
Few problems I have with the textarea component, and I need help real quick pleeease?

Number 1. Is there any way I can load a large amount of text stored in a TXT file into the box on the click of a button?
Number 2. Does textarea support scroll bars?
Number 3. Can I alter the colours of the textarea?

Please pelase please help!

View Replies !    View Related
Styles For TextArea Component
Hi everyone,

Can any one tell me why the myTextArea.setStyle("color", 0xFFFFFF), that supposed to change default color of text does not work for the TextArea component in 2004? I'm using actionscript 2.0.

Actualy the only property that works for TextArea is the "backround"... For some reason "color" property works for ListBox on the same timeline... And yes, I did double checked that I did not misspelled the instance name of the component...

Thanks for your time,
Peter

View Replies !    View Related
TextArea Component Difficulty
I’ve stayed clear of Components for as long as i can because i find them really hard to customise but I’ve realised there useful and had another go.

so...I’m trying to customise a TextArea. I managed to do the scrollbar by importing appropriate things into the library and changing them. What I really want is a completely invisible TextArea (not including the scroll bar and text of course). Can anyone tell me the best way of doing that?

If not i would like to convert RGB colours to the colour code used when using styles eg '0x848384'.

thanks you your help.

View Replies !    View Related
Where The Heck Is The TextArea Component ?
I have a number of components but I don't see the TextArea component.

do I have to load it from someplace or do I just use a text box and make it dynamic?

thanks.

View Replies !    View Related
TextArea Component Help Needed
Hello there. I am having a problem with the textarea component in flask mx2004. Here is the problem, when I use the textarea component in a mask the text does not show up. How do I get it to show up in a mask. I have tried everything I can think of and all the solution that I found on google and still no luck.

Thanks

View Replies !    View Related
TextArea Component Selectable
Hi there...

I have used a textArea component to import data from an xml file, and am wondering if there is any way to make the text in the textArea NOT selectable?
I would just put a blank, invisible button over top of it with a handcursor=false command, but the data being imported may or may not contain hyperlinks and if I cover it with an invisible button, the link won't work.
If anyone knows of any solution or work-around, I would really appreciate any pointers...

Cheers
G

View Replies !    View Related
Skinning A TextArea Component...?
I´m using a textArea component in my scene...I´ve imported the theme "SampleTheme.fla", edited the scrollBar assets and dragged them into my new *.fla.
Now - why aren´t these changes in my new *.fla when I run the movie?!
Is there any code I need to apply to my component on stage to make it use my modified theme?!

View Replies !    View Related
TextArea Component Problem
Hi, I have followed the flash-db tutorial to build a guestbook and I have finished it and the guestbook works except that the scrollbar in the TextArea component is not working as it should. When you push the next button and then the down arrow on the scrollbar it jumps to the bottom of the page and all text is selected. The scroller also gets stuck at the bottom untill you drag it loose with the bar or scroll with the mousewheel.

Has anyone a solution for this or is it a "bug" in the component?

View Replies !    View Related
TextArea Component And Images
When I try to use in image, I'll use this as an example.

PHP Code:



myTextArea.text = "<a href="http://dsp.blueidea.com/thinkfuse/articleimg/013/013.jpg"><img src="http://dsp.blueidea.com/thinkfuse/articleimg/013/013.jpg"></a><br>Hello!";




The text, Hello! appears on the right of the image, not under it, I don't know what is causing this problem, any ideas?

View Replies !    View Related
TextArea Component = String?
hi,
ok say i have the following code:
myString= new String("poo poo")

how would i make the text area display the string?

thanks,

zlatan..

View Replies !    View Related
TextArea Scrollpane Component
I am using the text area scrollpane component in Flash MX. It works great with text, but now I want to put images in the same pane with my text. Problem is, it doesn't scroll the images with the text. How can I do this in the same box? Either that, or how can I use different fonts, etc. in the same scrollpane? (for example when I change one word to bold, the whole thing turns bold)

Thanks!

View Replies !    View Related
Draggable TextArea Component?
I'd like to use the TextArea component to easily add different statements in a variety of text boxes on the stage, I must be able to drag them individually and I will be changing the statements quite often. One other constraint is that it must not use any external files!

Can anyone shed any light on this perplexing problem? Even post a mockup?

Thanks for reading.

Richard

View Replies !    View Related
Help Working With TextArea Component
I'm trying to create a simple Rich Text Editor and I'm running into a problem. Right now I have a simple button that will bold all the text in my TextArea. My question is how can I format a selection of text in the TextArea. Any help on how to achieve this will be greatly appreciated. I've attached my current file(MX04Pro) so you can see where I'm currently at.

View Replies !    View Related
Getting Text From Textarea Component
Hi,

I have a text area component called w00t, on the actions layer for that frame, I have the following code:

var comment = w00t.text;
trace(comment);

However, I keep getting undefined, can anybody help?

Thanks in advance

View Replies !    View Related
[F8] Customize TextArea Component
I'm very much a beginner with ActionScripting so to anyone who may help me, don't expect me to know 'the obvious stuff'.

I'm trying to set the background of my TextArea to black (along with the border) and the text inside to red. A scroll bar shows up as well and I want that to be anything but white (I'm not sure what yet, as I think I'll want to play with the colour of it).
I've tried to look this up on various sites, including FlashKit, and though I've found a couple of solutions none of them are working for me. I'm guessing it's because there's something else in the AS that people aren't posting because it's 'obvious'.

Any and all help is appreciated.

View Replies !    View Related
Chat With TextArea-component
I have a socket-chat that uses a regular TextArea component for displaying the messages.

First of all im not sure the textArea is a good choice for this, bc of the performance issue...

Anyway when a message is added i use something like this:
Code:
myTextArea.htmlText += "<b>message</b>";
myTextArea.textField.scrollV = myTextArea.textField.maxScroll
1. Is that a good way to do the job? I was hoping there
was a better way, like append() or something like that.

2. How can I reduce the textamount in it? Lets say i want to set maximum
rows of text to 100, after that the first line dissapears, and so on.

View Replies !    View Related
Customizing TextArea Component
I've been trying to find a piece of code or a tutorial that actually works for days and I am beginning to wonder that is simply not possible to change the font color of a TextArea component instance in Flash 8.

The text is being loaded by php variables from a database into a textarea component. I have tried formatting externally as HTML and have tried all the setStyle codes I could find on the net so far with no luck. Either I am doing something totally wrong or it isn't possible to customize components in flash 8. Any clarifications please?


Thanks

View Replies !    View Related
CSS, HTML And TextArea Component
Hi,

I switched over from a Dynamic Text box to a textArea Component, now my stylesheet wont load and I cant figure why...

Could someone please point out where I have gone wrong ??


ActionScript Code:
var format:StyleSheet = new StyleSheet();
var stylez:URLLoader = new URLLoader();
stylez.load(new URLRequest("panels/styles.css"));
stylez.addEventListener(Event.COMPLETE, loadStyles);


function loadStyles():void {
format.parseCSS(stylez.data);
external_txt.styleSheet = format;
//trace("styles loaded");
}
                                                      
var externalLoad:URLLoader = new URLLoader();
cbMonths.addEventListener(Event.CHANGE, switchFeed);
//externalLoad.load(externalReq);

var monthLabels:Array = new Array("January",
                  "February",
                  "March",
                  "April",
                  "May",
                  "June",
                  "July",
                  "August",
                  "September",
                  "October",
                  "November",
                  "December");

var now:Date = new Date();
//trace(now.getMonth());
//trace(monthLabels[now.getMonth()]);

var autoMonth = monthLabels[now.getMonth()];




function switchFeed(evt:*):void {
   
if(cbMonths.selectedLabel != "select month..") {

var month:URLRequest = new URLRequest("blog/"+evt.target.selectedLabel+".html");
externalLoad.load(month);
externalLoad.addEventListener(Event.COMPLETE, textReady);

}else{
   
nowDate();
}

}

function nowDate():void {
var currentmonth:URLRequest = new URLRequest("blog/"+autoMonth+".html");
externalLoad.load(currentmonth);
externalLoad.addEventListener(Event.COMPLETE, textReady);
}

nowDate();


function textReady(event:Event):void
{
external_txt.htmlText = event.target.data;
}


Any Help appreciated !!!


JSAUL

View Replies !    View Related
Textarea Component Skinning
Hi,

I need to use two differently skinned textareas in one flash movie. I've renamed the first textarea to textarea1 in the library, but when I drag a new textarea onto the stage, it tries to replace the first textarea.

Is there a way to load two so that I can customize each?

Thanks!

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved