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.

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

frame:Object - A number representing the frame number, or a string representing the label<br />

of the frame, to which the playhead is sent.<br />

Example<br />

The following example uses the _framesloaded property to start a SWF file when all of the<br />

frames are loaded. If all of the frames aren't loaded, the _xscale property of the loader<br />

movie clip instance is increased proportionally to create a progress bar.<br />

Enter the following ActionScript in Frame 1 of the Timeline:<br />

var pctLoaded:Number = Math.round(this.getBytesLoaded()/<br />

this.getBytesTotal()*100);<br />

bar_mc._xscale = pctLoaded;<br />

Add the following code to Frame 2:<br />

if (this._framesloaded

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

Saved successfully!

Ooh no, something went wrong!