Loading swf (which has its own preloader)

In my main movie, I am trying to load a welcome section (“welcome.swf”) into a blank movieclip (instance name: contents)

Now, welcome.swf has its own simple preloader. When I test the movie (welcome.swf) on its own, its fine - the little preloading animation shows. However, when trying to load it from the main movie, all I get is a brief glimpse of the preloader animation then MY MAIN MOVIE RETURNS TO THE BEGINNING AGIN - AND KEEPS LOOPING!!

Here’s my code:

SCRIPT TO LOAD WELCOME SECTION ON MAIN MOVIE TIMELINE:

_root.contents.loadMovie(“welcome.swf”);

PRELOADER SCRIPT FOR WELCOME.SWF

total = _root.getBytesTotal();
loaded = _root.getBytesLoaded();
if (loaded>=total) {
_root.gotoAndPlay(32)
}

Why is it not working???

I think you should try this code

total = _root.contents.getBytesTotal();
loaded = _root.contents.getBytesLoaded();
if (loaded>=total) {
_root.contents.gotoAndPlay(32)
}

or

total = this.getBytesTotal();
loaded = this.getBytesLoaded();
if (loaded>=total) {
this.gotoAndPlay(32)
}

may be any one of these code will work


Ranish