MovieClipLoader class

Availability

Flash Player 7.

Description

This class lets you implement listener callbacks that provide status information while SWF or JPEG files are being loaded (downloaded) into movie clips. To use MovieClipLoader features, use MovieClipLoader.loadClip() instead of loadMovie() or MovieClip.loadMovie() to load SWF files.

After you issue the MovieClipLoader.loadClip() command, the following events take place in the order listed:

After MovieClipLoader.onLoadInit()has been invoked, you can set properties, use methods, and otherwise interact with the loaded movie.

If the file fails to load completely, the MovieClipLoader.onLoadError() listener is invoked.

Method summary for the MovieClipLoader class

Method

Description

MovieClipLoader.addListener()

Registers an object to receive notification when a MovieClipLoader event handler is invoked.

MovieClipLoader.getProgress()

Returns the number of bytes loaded and total number of bytes for a file that is being loaded using MovieClipLoader.loadClip().

MovieClipLoader.loadClip()

Loads a SWF or JPEG file into a movie clip in Flash Player while the original movie is playing.

MovieClipLoader.removeListener()

Deletes an object that was registered using MovieClipLoader.addListener().

MovieClipLoader.unloadClip()

Removes a movie clip that was loaded by means of MovieClipLoader.loadClip().

Listener summary for the MovieClipLoader class

Listener

Description

MovieClipLoader.onLoadComplete()

Invoked when a file loaded with MovieClipLoader.loadClip() has completely downloaded.

MovieClipLoader.onLoadError()

Invoked when a file loaded with MovieClipLoader.loadClip() has failed to load.

MovieClipLoader.onLoadInit()

Invoked when the actions on the first frame of the loaded clip have been executed.

MovieClipLoader.onLoadProgress()

Invoked every time the loading content is written to disk during the loading process.

MovieClipLoader.onLoadStart()

Invoked when a call to MovieClipLoader.loadClip() has successfully begun to download a file.

Constructor for the MovieClipLoader class

Availability

Flash Player 7.

Usage

new MovieClipLoader()

Parameters

None.

Returns

Nothing.

Description

Constructor; creates a MovieClipLoader object that you can use to implement a number of listeners to respond to events while a SWF or JPEG file is downloading.

Example

See MovieClipLoader.loadClip().

See also

MovieClipLoader.addListener()