Got a request?
Email us...

ActionScript Reference crumb.gif Movie Clip Control crumb.gif MovieClipLoader class

MovieClipLoader class

Availability:
Flash Player 7

Usage:
new MovieClipLoader();

Description:
The MovieClipLoader class allows you to easily load in external SWF or JPEG files into a Flash movie at runtime using listener callbacks. This fixes many problems which existed when loading documents into Flash in previous versions of the program.

The MovieClipLoader class handles the following four events:
- onLoadStart: called when the file has successfully started downloading.
- onLoadProgress: called repeatedly while the content is being downloaded.
- onLoadComplete: called when the content has finished loading.
- onLoadInit: called after the first few frames of the loaded clip have been executed.

By taking advantage of these four events you can easily load a new SWF or JPEG and build a preloader to monitor the load progress without having to resort to using either onEnterFrame or the setInterval method. If an error is encounted while trying to load an external file, Flash will invoke the onLoadError method.

Example:
The following code creates a new MovieClipLoader object which can be used to load an external SWF or JPEG.

var myLogo:MovieClipLoader = new MovieClipLoader();

REFERENCE SEARCH


RELATED ENTRIES

...r.onLoadComplete()
...ader.getProgress()
...ader.addListener()
...oader.unloadClip()
...pLoader.loadClip()

LINK TO US