I have this class…
/**
Constructs a
@author
@version 2006-02-16
@copyright (c) 2006 The Chopping Block, Inc.. All rights reserved.
@usage
- Activate with:
<code>
</code>
*/
class com.choppingblock.advflash.ui.LoadView extends MovieClip{
private var loader:MovieClipLoader;
private var theurl:String;
// lame!
private var progress_mc:MovieClip;
private var img_mc:MovieClip;
public var done:Boolean
// ===========================================================
// - CONSTRUCTOR
// ===========================================================
function LoadView () {
//trace("LoadView");
loader = new MovieClipLoader();
loader.addListener(this);
};
// ===========================================================
// - ACCESSORS
// ===========================================================
/**
Returns the mc used for a progress indicator
@return MovieClip
*/
public function getProgressClip() {return progress_mc;}
// ===========================================================
// - LOADING
// ===========================================================
function load (theurl:String){
//trace("i will attempt to load "+theurl);
// if there is no img_mc, create one
if (!img_mc) createEmptyMovieClip('img_mc', 1);
// clear old
unload();
// save new
this.theurl = theurl;
// load new
loader.loadClip(theurl, img_mc)
};
public function unload() {
loader.unloadClip(img_mc);
}
function onLoadStart (clip:MovieClip){
//trace("Load Start from "+this);
getProgressClip().startAnimation();
};
function onLoadProgress (clip:MovieClip, bytesLoaded:Number, bytesTotal:Number){
//trace("Load Progress");
//trace(clip + ".onLoadProgress with " + bytesLoaded + " bytes of " + bytesTotal);
getProgressClip().setTotal(bytesTotal);
getProgressClip().setValue(bytesLoaded);
getProgressClip().update();
};
function onLoadComplete (clip:MovieClip){
trace("Load Complete");
//this.self.progress_mc.gotoAndStop(1);
getProgressClip().stopAnimation();
};
public function onLoadError(clip:MovieClip, errorCode) {
// TODO: Throw
trace('');
trace('+-----------------------------------------------+');
trace ("ERROR: " + errorCode);
trace ("Failed to load: " + theurl);
trace (" Into: " + clip);
trace('+-----------------------------------------------+');
trace('');
}
};
When onLoadComplete is true I want to call a showImage function from another class. But if write this it does not work. Can anyone help?
function onLoadComplete (clip:MovieClip){
trace(“Load Complete”);
//this.self.progress_mc.gotoAndStop(1);
getProgressClip().stopAnimation();
showImage();
The error I get is this…
There is no method with the name ‘showImage’.
showImage();