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

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

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

Brings the playhead to the specified frame of the movie clip <strong>and</strong> stops it there. To specify a<br />

scene in addition to a frame, use the gotoAndStop() method.<br />

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

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

Parameters<br />

frame:Object - The frame number to which the playhead is sent.<br />

Example<br />

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

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

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

Enter the following <strong>ActionScript</strong> on 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 on Frame 2:<br />

if (this._framesloaded

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

Saved successfully!

Ooh no, something went wrong!