03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

When you test this example, the URL of the SWF file you are testing, <strong>and</strong> the file called<br />

best_flash_ever.swf are displayed in the Output panel.<br />

The MovieClipLoader class used in this example requires Flash Player 7 or later.<br />

variable (TextField.variable property)<br />

public variable : String<br />

The name of the variable that the text field is associated with. The type of this property is<br />

String.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 6<br />

Example<br />

The following example creates a text field called my_txt <strong>and</strong> associates the variable<br />

today_date with the text field. When you change the variable today_date, then the text that<br />

displays in my_txt updates.<br />

this.createTextField("my_txt", 1, 10, 10, 200, 22);<br />

my_txt.variable = "today_date";<br />

var today_date:Date = new Date();<br />

var date_interval:Number = setInterval(updateDate, 500);<br />

function updateDate():Void {<br />

today_date = new Date();<br />

}<br />

_visible (TextField._visible property)<br />

public _visible : Boolean<br />

A Boolean value that indicates whether the text field my_txt is visible. Text fields that are not<br />

visible (_visible property set to false) are disabled.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 6<br />

Example<br />

The following example creates a text field called my_txt. A button called visible_btn<br />

toggles the visibility of my_txt.<br />

this.createTextField("my_txt", 1, 10, 10, 200, 22);<br />

my_txt.background = true;<br />

my_txt.backgroundColor = 0xDFDFDF;<br />

my_txt.border = true;<br />

my_txt.type = "input";<br />

1242 <strong>ActionScript</strong> classes

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

Saved successfully!

Ooh no, something went wrong!