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.

on(release) {<br />

toggleHighQuality();<br />

}<br />

See also<br />

_highquality property, _quality property<br />

trace function<br />

trace(expression:Object)<br />

You can use Flash Debug Player to capture output from the trace() function <strong>and</strong> write that<br />

output to the log file.<br />

Statement; evaluates the expression <strong>and</strong> displays the result in the Output panel in test mode.<br />

Use this statement to record programming notes or to display messages in the Output panel<br />

while testing a SWF file. Use the expression parameter to check whether a condition exists,<br />

or to display values in the Output panel. The trace() statement is similar to the alert<br />

function in JavaScript.<br />

You can use the Omit Trace Actions comm<strong>and</strong> in the Publish Settings dialog box to remove<br />

trace()actions from the exported SWF file.<br />

Parameters<br />

expression:Object - An expression to evaluate. When a SWF file is opened in the Flash<br />

authoring tool (using the Test Movie comm<strong>and</strong>), the value of the expression parameter is<br />

displayed in the Output panel.<br />

Example<br />

The following example uses a trace() statement to display in the Output panel the methods<br />

<strong>and</strong> properties of the dynamically created text field called error_txt:<br />

this.createTextField("error_txt", this.getNextHighestDepth(), 0, 0, 100,<br />

22);<br />

for (var i in error_txt) {<br />

trace("error_txt."+i+" = "+error_txt[i]);<br />

}<br />

/* output:<br />

error_txt.styleSheet = undefined<br />

error_txt.mouseWheelEnabled = true<br />

error_txt.condenseWhite = false<br />

...<br />

error_txt.maxscroll = 1<br />

error_txt.scroll = 1<br />

84 ActionScript language elements

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

Saved successfully!

Ooh no, something went wrong!