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.

Example<br />

In the following example, a document has two scenes: sceneOne <strong>and</strong> sceneTwo. Scene one<br />

contains a frame label on Frame 10 called newFrame, <strong>and</strong> two buttons, myBtn_btn <strong>and</strong><br />

myOtherBtn_btn. This ActionScript is placed on Frame 1, Scene 1 of the main Timeline:<br />

stop();<br />

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

gotoAndStop("newFrame");<br />

};<br />

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

gotoAndStop("sceneTwo", 1);<br />

};<br />

When the user clicks the buttons, the playhead moves to the specified location <strong>and</strong> stops.<br />

See also<br />

gotoAndStop (MovieClip.gotoAndStop method), stop function, play function,<br />

gotoAndPlay function<br />

ifFrameLoaded function<br />

ifFrameLoaded( [scene,] frame) { statement(s); }<br />

Deprecated since Flash Player 5. This function has been deprecated. <strong>Adobe</strong> recommends that<br />

you use the MovieClip._framesloaded property.<br />

Checks whether the contents of a specific frame are available locally. Use ifFrameLoaded to<br />

start playing a simple animation while the rest of the SWF file downloads to the local<br />

computer. The difference between using _framesloaded <strong>and</strong> ifFrameLoaded is that<br />

_framesloaded lets you add custom if or else statements.<br />

Parameters<br />

scene:String [optional] - A string that specifies the name of the scene that must be loaded.<br />

frame:Object - The frame number or frame label that must be loaded before the next<br />

statement is executed.<br />

statement(s):Object - The instructions to execute if the specified scene, or scene <strong>and</strong><br />

frame, are loaded.<br />

See also<br />

addListener (MovieClipLoader.addListener method)<br />

Global Functions 51

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

Saved successfully!

Ooh no, something went wrong!