Skip to main content
Participant
November 23, 2008
Question

Preloader Event.COMPLETE annoying thing

  • November 23, 2008
  • 5 replies
  • 460 views
Hi Everyone

I'm sure someone knows a quick answer for this:

The preloader I usually use executes an addChild(loadedMovie) statement in response to an Event.COMPLETE event from the loaded swf's contentLoaderInfo object (a common approach, I believe.) The problem with this (as many of us know) is that the loaded swf starts running before the Event.COMPLETE event gets thrown, which means that once the child is added, it is already a few frames into its timeline. What I need is a way for the loaded swf not to start playing til its COMPLETE event gets thrown. Any ideas on how to do this (or some other workaround) ?

Thanks In Advance,
Graham
This topic has been closed for replies.

5 replies

kglad
Community Expert
Community Expert
November 24, 2008
you're welcome.
Participant
November 24, 2008
Hey, thanks a lot! That was a big help. Be Well, Graham
kglad
Community Expert
Community Expert
November 23, 2008
yes. add an empty keyframe to frame 1 of your loading swf and attach a stop() to that frame (1). then in your complete listener execute play() method on the loader's content property (cast as a movieclip).
Participant
November 23, 2008
Right. Then, what, run play() once COMPLETE is fired?

Thanks!
Graham
Inspiring
November 23, 2008
You can try Event.INIT and put stop() on it.

COMPLETE event is fired when all the frames are loaded.