# \[FMX04\] Reusable Preloader from tutorial

**URL:** https://forum.kirupa.com/t/fmx04-reusable-preloader-from-tutorial/88731
**Category:** flash
**Created:** [May 2, 2005, 7:43am UTC](https://forum.kirupa.com/t/fmx04-reusable-preloader-from-tutorial/88731 "2005-05-02T07:43:25Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![HVM](https://avatars.discourse-cdn.com/v4/letter/h/7bcc69/32.png) [@HVM](https://forum.kirupa.com/u/HVM)
#### Post date: [May 2, 2005, 7:43am UTC](https://forum.kirupa.com/t/fmx04-reusable-preloader-from-tutorial/88731/1 "2005-05-02T07:43:25Z")

</div>

I’ve been using the "[[size=2][color=Black]**[font=Verdana]Reusable[/font]**[/color][/size][font=Verdana][size=2][color=Black] Preloader [/color][/size][/font][font=Verdana][size=4][color=#003366][url=“http://www.kirupa.com/developer/actionscript/moviecliploader.htm”][size=2][color=Black]Using MovieClipLoader"[/color][/size]](http://www.kirupa.com/developer/actionscript/moviecliploader.htm) [color=Black][size=2]from the tutorial section of this site.  
The only difference is that i don’t use 'm for preloading jpg. I load external swf files containing video. Everything works fine so far. The only problem is that the preloaded video already starts playing while preloading (at about 30%), but without showing the video.

This is the code i have so far:

```auto
bar._visible = false;
border._visible = false;
this.createEmptyMovieClip("container", "100");
container._x = 10;
container._y = 10;
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);

};
[color=Red] preload.onLoadComplete = function(targetMC)[/color] {
	
container._visible = true;
border._visible = false;
bar._visible = false;
pText._visible = false;
trace(targetMC+" finished");

};
//default image
my_mc.loadClip("img/flash/screen.jpg", "container");
//buttons
button1.onPress = function() {
my_mc.loadClip("img/flash/commercial_high.swf", "container");
};
button2.onPress = function() {
my_mc.loadClip("img/flash/commercial_med.swf", "container");
};
button3.onPress = function() {
my_mc.loadClip("img/flash/commercial_low.swf", "container");
};

```

I think it goes wrong at the accentuated code?

Can anyone of you help me with this?  
[/size][/color][/color][/size][/font]
