# Reusable Preloader

**URL:** <https://forum.kirupa.com/t/reusable-preloader/147139>\
**Category:** Uncategorized\
**Created:** [May 7, 2005, 3:22pm UTC](https://forum.kirupa.com/t/reusable-preloader/147139 "2005-05-07T15:22:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![g5604](https://avatars.discourse-cdn.com/v4/letter/g/54ee81/32.png) [@g5604](https://forum.kirupa.com/u/g5604)\
**Post date:** [May 7, 2005, 3:22pm UTC](https://forum.kirupa.com/t/reusable-preloader/147139/1 "2005-05-07T15:22:10Z")

</div>

Hi,

[font=verdana, arial, helvetica][size=2]I am trying to preload sections of my site, apears to be working great except the percentage (pText) refuses to display and none of my traces are working, any ideas?

empty = \_root.main\_mc.createEmptyMovieClip(“container”, “100”)  
empty.\_x = -250;  
empty.\_y = -280;  
my\_mc = new MovieClipLoader();  
preload = new Object();  
my\_mc.addListener(preload);  
preload.onLoadStart = function(targetMC) {  
trace("started loading "+targetMC);  
\_root.main\_mc.container.\_alpha = 0;  
pText.\_visible = true;  
};  
preload.onLoadProgress = function(targetMC, lBytes, tBytes) {  
pText.text = “% “+Math.round((lBytes/tBytes)\*100);  
};  
preload.onLoadComplete = function(targetMC) {  
// maskmove  
\_root.main\_mc.container.\_alpha = 100;  
pText.\_visible = false;  
trace(targetMC+” finished”);  
};  
var myLoad = \_root.main\_mc.container.loadMovie(“news.swf”);[/size][/font]
