PDA

View Full Version : loadMovie question



atomgiant
June 4th, 2003, 09:23 AM
Hi,

In Flash 5:

If I call the loadMovie() method and then immediately try to call stop() on the loaded movie, it will not work.

However, if I call stop() elsewhere, it will work.

Could someone explain why this is the case? I tried looping until the movie is loaded but it still will not work.

Thanks,
---atomgiant

Voetsjoeba
June 4th, 2003, 10:51 AM
Are you calling stop(); from within the loaded movie or from the main movie ?

atomgiant
June 4th, 2003, 11:06 AM
I am calling stop from within the main movie.

For example, I have a clip with an onLoad event that will attempt to loadMovie() the new movie by calling a function similar to the following pseudo-code (this is not the actual code so ignore code errors):

onClipEvent( load )
{
init(); // calls the init function listed below

// NOTE: if I call _root.myClip.stop() here it will work
}


function init()
{
loadMovie( 'movie.swf', '_root.myClip' );

_root.myClip.stop(); // this will not work
}