# Preloader Load MC on Load

**URL:** <https://forum.kirupa.com/t/preloader-load-mc-on-load/162046>\
**Category:** flash\
**Created:** [September 9, 2005, 5:17am UTC](https://forum.kirupa.com/t/preloader-load-mc-on-load/162046 "2005-09-09T05:17:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![michael1](https://avatars.discourse-cdn.com/v4/letter/m/eada6e/32.png) [@michael1](https://forum.kirupa.com/u/michael1)\
**Post date:** [September 9, 2005, 5:17am UTC](https://forum.kirupa.com/t/preloader-load-mc-on-load/162046/1 "2005-09-09T05:17:48Z")

</div>

Okay, the thread title is a little confusing. I made a previous thread but didn’t get the feedback I needed. I found this tutorial by kirupa helping me on my situation, but again I am lacking in the actionscript format, and am needing assistance.

Essentially, I have a preloader MC “index.swf” that will load “main.swf” on to a higher layer. I’m doing this because my initial preloader inside main.swf does not show it’s loading until 72%.

What do I need to change correct to this code so that it starts to index.swf loads main.swf

```auto
 
bar._visible = false; 
border._visible = false; 
this.createEmptyMovieClip("container", "100"); 
my_mc = new MovieClipLoader(); 
preload = new Object(); 
my_mc.addListener(preload); 
preload.onLoadStart = function(targetMC) { 
trace("started loading "+targetMC); 
container._visible = false; 
bar._visible = true; 
border._visible = true; 
pText._visible = true; 
}; 
preload.onLoadProgress = function(targetMC, lBytes, tBytes) { 
bar._width = (lBytes/tBytes)*100; 
pText.text = "% "+Math.round((lBytes/tBytes)*100); 
}; 
preload.onLoadComplete = function(targetMC) { 
container._visible = true; 
border._visible = false; 
bar._visible = false; 
pText._visible = false; 
trace(targetMC+" finished"); 
}; 
//default image my_mc.loadClip("picture1.jpg", "container"); 
//buttons button1.onPress = function() 
{ my_mc.loadClip("picture1.jpg", "container"); 
}; 
button2.onPress = function() { 
my_mc.loadClip("picture2.jpg", "container"); 
}; 
button3.onPress = function() { 
my_mc.loadClip("picture3.jpg", "container"); 
}; 

```

Again I am not pushing a button to load the movie, I essentialy want index.swf to say, hey on load, start to preload main.swf, once it’s loaded, go for it 😃

Thanks all
