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.

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.When you test this example, the URL<br />

of the SWF file you are testing, <strong>and</strong> the file called best_flash_ever.swf write to the log file.<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 />

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 />

appears in my_txt updates.<br />

this.(reateTextField("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 />

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 />

visible_btn.onRelease = function() {<br />

my_txt._visible = !my_txt._visible;<br />

};<br />

TextField 649

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

Saved successfully!

Ooh no, something went wrong!