Class com.maheshj.utils.ContentLoader

Description

This is a class that can be used a substitute to load images and swf's into any movieclip. The reason one may choose this as a substitute to MovieClipLoader class is that you don't have to create a separate listener object to listen to the load events. All the events dispatched by this class are the same as that if MovieClipLoader class.

Usage:
An example usage can be something like this:

import com.maheshj.utils.ContentLoader;
var con_cl:ContentLoader = new ContentLoader();
this.createEmptyMovieClip("content_mc", this.getNextHighestDepth());
con_cl.onLoadInit = function(){
trace("content loaded");
}
con_cl.loadContent("1.jpg", content_mc);

Here 1.jpg can be any image you want to load into the content_mc movieclip.

Method Index

new ContentLoader()
addEventListener(), loadContent(), onLoadComplete(), onLoadError(), onLoadInit(), onLoadProgress(), onLoadStart(), removeEventListener()

Constructor Detail

ContentLoader

public function ContentLoader()

Method Detail

loadContent

public function loadContent(path:String, img_mc:MovieClip)

Use this method to load content into any movieclip.

Parameters

path- The path of the file which is to be loaded
img_mc- The movieclip into which the file is to be loaded

onLoadStart

public function onLoadStart()

onLoadProgress

public function onLoadProgress(t_mc:MovieClip, bl:Number, bt:Number)

onLoadInit

public function onLoadInit(t_mc:MovieClip)

onLoadComplete

public function onLoadComplete()

onLoadError

public function onLoadError(t_mc:MovieClip, errorCode:String, httpStatus:Number)

addEventListener

public function addEventListener()

removeEventListener

public function removeEventListener()