# Problem with preloader on movieclip

**URL:** <https://forum.kirupa.com/t/problem-with-preloader-on-movieclip/149550>\
**Category:** flash\
**Created:** [May 30, 2005, 3:14pm UTC](https://forum.kirupa.com/t/problem-with-preloader-on-movieclip/149550 "2005-05-30T15:14:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![appman](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@appman](https://forum.kirupa.com/u/appman)\
**Post date:** [May 30, 2005, 3:14pm UTC](https://forum.kirupa.com/t/problem-with-preloader-on-movieclip/149550/1 "2005-05-30T15:14:52Z")

</div>

Hi guys,

I was wondering if anyone could help with a problem I continue to keep getting…

OK what im trying to do is get a preloader to work within a movie and not on the base level. My site is [http://wonderland.tux.nu](http://wonderland.tux.nu) when its loaded goto any of the image levels where you will see a screen fade in and then u can view the images.

So what it is im trying to implant a video section where I am using this code:

bar.\_visible = false;  
createEmptyMovieClip(“container”, 1);  
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;  
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;  
bar.\_visible = false;  
pText.\_visible = false;  
trace(targetMC+" finished");

};  
//buttons  
button1.onPress = function() {

my\_mc.loadClip(“loaded.swf”, “container”);  
}

If I create this on a new movie with 4 layers as follows actions,bar,text and button with the above instance names and movieclips I can get a preloader and a fully working movie that plays.

My problem is when I try to implant this say on my website in the video section using the above format but within a movie it refuses to load the movie, I think its due to the paths im using but I have used \_root and this to the correct parent and child locations and it wont work within a movie.

Any suggestions would be great…

I am using Flash Mx Pro

Regards
