Flash Lite 1.x ActionScript Language Reference |
|
|
|
| Flash Lite Global Functions > ifFrameLoaded() | |||
Flash Lite 1.0.
ifFrameLoaded([scene,]frame) {statement(s);}
scene An optional string specifying the name of the scene to be loaded.
frame The frame number or frame label to be loaded before the next statement can execute.
statement(s) The instructions to execute if the specified frame, or scene and frame, are loaded.
Function; checks whether the contents of a specific frame are available locally. Use the ifFrameLoaded function to start playing a simple animation while the rest of the SWF file downloads to the local computer. You can also use the _framesloaded property to check the download progress of an external SWF file. The difference between using _framesloaded and ifFrameLoaded is that _framesloaded lets you add custom if or else statements.
The following example uses the ifFrameLoaded function to check if Frame 10 of the SWF file is loaded. If the frame is loaded, the trace() command prints "frame number 10 is loaded" to the Output panel. The output variable is also defined with a variable of frame loaded: 10.
ifFrameLoaded(10) {trace ("frame number 10 is loaded");output = "frame loaded: 10";}
|
|
|
|