How do I insert an ENTER in a dynamic field through action script??? I want to have two lines of text and I want to insert them through a variable. Thanks!
I would create a movie clip that is the text field you want. (embedded fonts, text size, etc), call the textbox on the movie clip 'textLabel' set the linkage for that clip so you can use attachMovie to clone it to the stage. _root.attachMovie("yourLinkageName", "yourTextBox", getNextHighestLayer()); Then set the _x and _y of the text box _root.yourTextBox._y = 39; _root.yourTextBox._x= 50; Then set your text _root.yourTextBox.textLabel.text = yourVariable; Give that a try
Ok. This I have it clear. But I want to put two different texts in one dynamic field and each text (text1) in one line and text2 in line 2. Can I put _root.myText_txt.text = myVariable1+RETURN+myVariable2 or _root.myText_txt.text = myVariable1+ENTER+myVariable2 or something like that? Thanks!
You can use: _root.myText_txt.text = myVariable1+'\n'+myVariable2; or _root.myText_txt.text = myVariable1+'\r'+myVariable2; or _root.myText_txt.text = myVariable1+newline+myVariable2; For the first two ways, if you are using actual strings, you can include the \n right in the string... e.g.: _root.myText_txt.text = "this is some text\nwith another line!"; or _root.myText_txt.text = "this is some text\rwith another line!";
Don't see what you're looking for? Try a search.
|