Access keys

MediaLoad

Kind of class: class
Inherits from: BytesLoad < RetryableLoad < Load < EventDispatcher < CoreObject
Known subclasses:
Version: 12/20/06
Author: Aaron Clinger
Classpath: org.casaframework.load.media.MediaLoad
File last modified: Monday, 08 January 2007, 09:57:51
Allows the implementation of event observers that provide status information while SWF, JPEG, GIF, and PNG files are being loaded into a MovieClip or level.
This is designed to replace loadMovie().

Advantages over MovieClipLoader & loadMovie:
Since:
Flash Player 7
Example:
this.createEmptyMovieClip("loadZone_mc", this.getNextHighestDepth());

function onImageLoadProgress(sender:MediaLoad, bytesLoaded:Number, bytesTotal:Number):Void {
    trace(bytesLoaded + "/" + bytesTotal + " bytes have been loaded into " + sender.getMovieClip());
}

var mediaLoad:MediaLoad = new MediaLoad(this.loadZone_mc, "test.jpg");
this.mediaLoad.addEventObserver(this, MediaLoad.EVENT_LOAD_PROGRESS, "onImageLoadProgress");
this.mediaLoad.start();

Summary

Constructor
Class properties
Class properties inherited from BytesLoad
Class properties inherited from RetryableLoad
Instance properties
Instance properties inherited from RetryableLoad
Instance properties inherited from Load
Instance properties inherited from EventDispatcher
Instance properties inherited from CoreObject

Constructor

MediaLoad

function MediaLoad (
target_mc:MovieClip, filePath:String, hideUntilLoaded:Boolean)
Defines file and location of load triggered by #start.
Parameters:
target_mc :
A path to a MovieClip container where the file specified by filePath should be loaded into.
filePath :
The absolute or relative URL of the SWF, JPEG, GIF, or PNG file to be loaded.
hideUntilLoaded:
[optional] Indicates to hide target_mc and its contents until file has completely loaded true, or to display contents while loading false; defaults to false.
Usage note:
Loading of GIF or PNG is only allowed when publishing to Flash Player 8 or greater.

Instance methods

destroy

function destroy (
) : Void

getMovieClip

function getMovieClip (
) : MovieClip
Returns:
Returns MovieClip specified in MediaLoad.