# MovieClipLoader preloading

**URL:** https://forum.kirupa.com/t/moviecliploader-preloading/299104
**Category:** flash
**Created:** [October 29, 2009, 7:13pm UTC](https://forum.kirupa.com/t/moviecliploader-preloading/299104 "2009-10-29T19:13:45Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![arctavian](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@arctavian](https://forum.kirupa.com/u/arctavian)
#### Post date: [October 29, 2009, 7:13pm UTC](https://forum.kirupa.com/t/moviecliploader-preloading/299104/1 "2009-10-29T19:13:45Z")

</div>

I’m trying to set up a website that uses the MovieClipLoader class to load external images & swfs. The loader is working but I can’t seem to get the preloader text to work, ie the onLoadProgress. The Percent text just has jibberish when I test the movie. Could some tell me what I’m doing wrong.

Attached is the test file that I’m working on

Here is the main timeline actionscript  
var mcl:MovieClipLoader = new MovieClipLoader ();  
var mclL:Object = new Object ();

mclL.onLoadProgress = function(target,loaded,total) {  
loaded\_mc.percent\_txt.text = Math.round((loaded/total)\*100) +"%";  
}

mclL.onLoadInit = function () {  
loader\_mc.\_visible = false;  
loader\_mc.percent\_txt.text = “”;  
};  
mcl.addListener(mclL);  
mcl.loadClip(“Home.swf”,movie\_ph);

home\_bn.onRelease = function() {  
loader\_mc.\_visible = true;  
mcl.loadClip(“home.swf”,movie\_ph);  
}

profile\_bn.onRelease = function() {  
loader\_mc.\_visible = true;  
mcl.loadClip(“profile.swf”,movie\_ph);  
}
