Text (Textfield.text Property) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Example
The following ActionScript creates a text field called
the new field, in both slash and dot notation.
this.createTextField("my_txt", this.getNextHighestDepth(), 10, 10, 100,
22);
trace(my_txt._target); // output: /my_txt
trace(eval(my_txt._target)); // output: _level0.my_txt

text (TextField.text property)

public text :
String
Indicates the current text in the text field. Lines are separated by the carriage return character
("\r", ASCII 13). This property contains the normal, unformatted text in the text field,
without HTML tags, even if the text field is HTML.
Availability: ActionScript 1.0; Flash Lite 2.0
Example
The following example creates an HTML text field called
formatted string of text to the field. When you trace the
displays the HTML-formatted stringthe HTML-formatted string writes to the log file. When
you trace the value of the
the Output panel.When you trace the value of the
HTML tags writes to the log file.
this.createTextField("my_txt", this.getNextHighestDepth(), 10, 10, 400,
22);
my_txt.html = true;
my_txt.htmlText = "<b>Remember to always update the help panel.</b>";
trace("htmlText: "+my_txt.htmlText);
trace("text: "+my_txt.text);
// output:
htmlText: <P ALIGN="LEFT"><FONT FACE="Times New Roman" SIZE="12"
COLOR="#000000">
<B>Remember to always update your help panel.</B></FONT></P>
text: Remember to always update your help panel.
See also
htmlText (TextField.htmlText property)
686
ActionScript classes
property, the unformatted string with HTML tags appears in
text
and outputs the target path of
my_txt
, and assigns an HTML-
my_txt
property, the Output panel
htmlText
property, the unformatted string with
text

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Questions and answers

Table of Contents