03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

size = 12<br />

color = 0x000000<br />

bold = false<br />

italic = false<br />

underline = false<br />

url = ""<br />

target = ""<br />

align = "left"<br />

leftMargin = 0<br />

rightMargin = 0<br />

indent = 0<br />

leading = 0<br />

blockIndent = 0<br />

bullet = false<br />

display = block<br />

tabStops = [] // (empty array)<br />

You can extend the methods <strong>and</strong> event h<strong>and</strong>lers of the MovieClip class by creating a subclass.<br />

Parameters<br />

instanceName:String - A string that identifies the instance name of the new text field.<br />

depth:Number - A positive integer that specifies the depth of the new text field.<br />

x:Number - An integer that specifies the x coordinate of the new text field.<br />

y:Number - An integer that specifies the ycoordinate of the new text field.<br />

width:Number - A positive integer that specifies the width of the new text field.<br />

height:Number - A positive integer that specifies the height of the new text field.<br />

Returns<br />

TextField -<br />

Example<br />

The following example creates a text field with a width of 300, a height of 100, an x<br />

coordinate of 100, a y coordinate of 100, no border, red, <strong>and</strong> underlined text:<br />

this.createTextField("my_txt", 1, 100, 100, 300, 100);<br />

my_txt.multiline = true;<br />

my_txt.wordWrap = true;<br />

var my_fmt:TextFormat = new TextFormat();<br />

my_fmt.color = 0xFF0000;<br />

my_fmt.underline = true;<br />

my_txt.text = "This is my first test field object text.";<br />

my_txt.setTextFormat(my_fmt);<br />

416 ActionScript classes

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!