# Class Question

**URL:** <https://forum.kirupa.com/t/class-question/218235>\
**Category:** Uncategorized\
**Created:** [March 6, 2007, 2:50am UTC](https://forum.kirupa.com/t/class-question/218235 "2007-03-06T02:50:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aruti](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@aruti](https://forum.kirupa.com/u/aruti)\
**Post date:** [March 6, 2007, 2:50am UTC](https://forum.kirupa.com/t/class-question/218235/1 "2007-03-06T02:50:16Z")

</div>

I have this class…

/\*\*  
Constructs a

```
@author 
@version 2006-02-16
@copyright (c) 2006 The Chopping Block, Inc.. All rights reserved.

@usage

- Activate with:
&lt;code&gt;

&lt;/code&gt;

```

\*/  
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();
