views:

32

answers:

1

Is it possible to set a listener or something like it to run a function once the flash movie itself has finished loading?

So something like: When this flash movie has finished loading, activate function.

Btw. I'm not trying to do this with a swf file loaded into another flash movie. I need this to be done by the movie once it self has finished loading.

+1  A: 

You can use "LoaderInfo" object, with "Event.COMPLETE".

Ex:

stage.loaderInfo.addEventListener(Event.COMPLETE,onComplete);

function onComplete(e:Event) { trace("loaded."); }

shams
stage.loaderInfo threw me some errors, but this.loaderInfo worked like a charm. Cheers.
Bjorninn