Trouble with preloader when using loadmovie

When ever i use loadmovie function in flash mx to load a swf into the original swf; i have a problem with the preloader of the new swf i call. As an independant swf, the preloader works fine. why is this so?

Does the swf that you are loading refer to the _root as in
if so, remove all references to _root as you are referencing the timeline of your main movie

Hope that helps


Yeah, I had the same problem and I just replaced “_root” with “_parent”

thanks a ton guys; however i am not using _root in the script; it is infact a script i got of this site. the script of preloader with bar
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent100;
this.loadText = Math.round(getPercent

if (bytes_loaded == bytes_total) {

well what is the problem you are having? does the preloader not give correct information or does it not start on time? please be more specific on what your problem actually is so we can help

Hi cellinis,
Agree with Digitalosophy, better still, post your fla, your code loks alright but there could be a conflict somewhere


I will try and put up the fla. But like most beginners, mine is a case of cut,paste and modifications.
My base movie is the index movie that uses load movie function to call in the movie when the button is pressed. It uses the information found on the site… creating a full flash site. It is rather simple and elegant!
The problem comes when i call in a new movie from withing the index movie using loadmovie. The preloader in the movie i called doesn’t display. Once the movie is loaded it is ok though. Then everything works clockwork.
the only possibility of the conflict that i can imagine is that the getbytesloaded and gettotalbytes function is getting the bytes loaded of the index movie and not of the movie where the preloader is located. My reasons for thinking this is:
When ever explorer is downloading a swf we can always see the progress at the bottom of the browser. But in case of an internal movie, the explorer doesn’t show the same.
Guess it helps in solving this small but bugging problem.

i have a funny feeling your variables in flash are wrong(for your textfields which loads the progress

Again I agree with Digitalosophy, check the names of your varaibles against the code, make sure that there are no typos, capitals where there shouldn’t be etc etc. Your code looks OK, if the movie is playing, then obviously it is loading OK, so can’t really think of anything else


Rookie question here …

When you want the same preloader to work for each .swf loaded into the same empty MovieClip, where do you place the actionscript? (Within each .swf file? … Or is there a more global procedure?)


I think there are a few tutes about shoing how to do this , but I have never manged it. I find it easier to put a preloader on to each swf tat is beng loaded in


Hey Guys,

Thanks for all your help. I managed to correct my problem.
My index.swf file is based on the kirupa tute of making a complete flash site. All new movies are loaded in a blank movie with instance name ‘contents’. In my movies which are loaded in this blank movie, i wrote _root.contents.getbytesloaded/getbytestotal and it seems to work.


Yup I agree with SteveD. I like to have preloaders in all .swf files, although the better way of doing it is to have one external preloader. However I have never tryed to do this, but the next sitre I do I will def try it.