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.

■ The MovieClipLoader.onLoadComplete h<strong>and</strong>ler is invoked when a file completes<br />

downloading, but before the loaded movie clip's methods <strong>and</strong> properties are available.<br />

This h<strong>and</strong>ler is called before the onLoadInit h<strong>and</strong>ler.<br />

■ The MovieClipLoader.onLoadInit h<strong>and</strong>ler is invoked after the actions in the first frame<br />

of the clip are executed, so you can begin manipulating the loaded clip. This h<strong>and</strong>ler is<br />

called after the onLoadComplete h<strong>and</strong>ler. For most purposes, use the onLoadInit<br />

h<strong>and</strong>ler.<br />

A SWF file or image loaded into a movie clip inherits the position, rotation, <strong>and</strong> scale<br />

properties of the movie clip. You can use the target path of the movie clip to target the loaded<br />

movie.<br />

You can use the loadClip() method to load one or more files into a single movie clip or level;<br />

MovieClipLoader listener objects are passed to the loading target movie clip instance as a<br />

parameter. Alternatively, you can create a different MovieClipLoader object for each file that<br />

you load.<br />

Use MovieClipLoader.unloadClip() to remove movies or images loaded with this method<br />

or to cancel a load operation that is in progress.<br />

MovieClipLoader.getProgress() <strong>and</strong> MovieClipLoaderListener.onLoadProgress do<br />

not report the actual bytesLoaded <strong>and</strong> bytesTotal values in the Authoring player when the<br />

files are local. When you use the B<strong>and</strong>width Profiler feature in the authoring environment,<br />

MovieClipLoader.getProgress() <strong>and</strong> MovieClipLoaderListener.onLoadProgress<br />

report the download at the actual download rate, not at the reduced b<strong>and</strong>width rate that the<br />

B<strong>and</strong>width Profiler provides.<br />

Parameters<br />

url:String - The absolute or relative URL of the SWF or JPEG file to be loaded. A relative<br />

path must be relative to the SWF file at level 0. Absolute URLs must include the protocol<br />

reference, such as http:// or file:///. Filenames cannot include disk drive specifications.<br />

target:Object - The target path of a movie clip, or an integer specifying the level in Flash<br />

Player into which the movie will be loaded. The target movie clip is replaced by the loaded<br />

SWF file or image.<br />

Returns<br />

Boolean - A Boolean value. The return value is true if the URL request was sent successfully;<br />

otherwise the return value is false.<br />

486 ActionScript classes

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

Saved successfully!

Ooh no, something went wrong!