# I need help with loadClip -\> onLoadComplete

**URL:** https://forum.kirupa.com/t/i-need-help-with-loadclip-onloadcomplete/170338
**Category:** Uncategorized
**Created:** [November 24, 2005, 8:03pm UTC](https://forum.kirupa.com/t/i-need-help-with-loadclip-onloadcomplete/170338 "2005-11-24T20:03:06Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![neakonk](https://avatars.discourse-cdn.com/v4/letter/n/90db22/32.png) [@neakonk](https://forum.kirupa.com/u/neakonk)
#### Post date: [November 24, 2005, 8:03pm UTC](https://forum.kirupa.com/t/i-need-help-with-loadclip-onloadcomplete/170338/1 "2005-11-24T20:03:06Z")

</div>

hello, i made the picture gallery whis loadMovie, but the flash mx2004 have my\_mc.loadClip function with better controlling of importing data with onLoadStart() etc.  
If i test my movie with internet connection simulation (56kB), i see message:

strarted loading \_level0.fotos  
(and immediatly comes the next one)  
\_level0.fotos loading finished

but the loading process is in progress and not finished.  
So, i cant use preloader ☹ It is always at 100 percent…  
please, help!!!

AS code (gallery works, but without loadcontrol):  
this.pathToSWF = “FotosAsSWF/”;  
this.swfArray = [“001.swf”, “002.swf”, “003.swf”, “004.swf”, “005.swf”, “006.swf”, “007.swf”, “008.swf”];  
this.swfIndex = 0;  
var my\_mc = new MovieClipLoader();  
preload = new Object();  
my\_mc.addListener(preload);  
my\_mc.loadClip(this.pathToSWF+this.swfArray[0], this.fotos);  
preload.onLoadStart = function(targetMc) {  
trace("started loading "+targetMc);  
trace(preload.getLoad);  
this.fotos.\_visible = false;  
this.loadingBar.\_visible = true;  
};  
[//preload.onLoadProgress](https://preload.onLoadProgress)() = function(targetMC, lBytes, tBytes) {

//};  
preload.onLoadComplete = function(target\_mc) {  
this.fotos.\_visible = true;  
trace(target\_mc+" loading finished ");  
};  
MovieClip.prototype.changeSWF = function(d) {  
this.swfIndex = (this.swfIndex+d)%this.swfArray.length;  
if (this.swfIndex\<0) {  
this.swfIndex += this.swfArray.length;  
}  
this.onEnterFrame = this.loadSWF();  
};  
MovieClip.prototype.loadSWF = function() {  
my\_mc.loadClip(this.pathToSWF+this.swfArray[this.swfIndex], this.fotos);

};  
this.onKeyDown = function() {  
if (Key.getCode() == Key.LEFT) {  
this.changeSWF(-1);  
} else if (Key.getCode() == Key.RIGHT) {  
this.changeSWF(1);  
}  
};
