Event Listener that waits for a MovieClip to stop playing.

Is there a way to execute a funcion once a MovieClip finishes playing. In other words, how could I execute a functionn once a movieClip reaches its last frame.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

What kind of function do you mean?

I would do this in the simplest way...Putting an Event Listener on the onStop command and then giving it an attribute...But without knowing exactly what function you want its a bit difficult to help
TonoNamAuthor Commented:
I have a function that just animates a bomb. The animation of the bomb consists of about 400 frames and once the animation reaches the 400th frame I am trying to run another function called explode. I have tried writing the function explode () on the time line of bomb_mc right after stop(); on the frame 400 but for some reason the function explode() does not work when I use it in the time line of bomb_mc and it just works when I put in on the main time line.
you just need to add an eventlistener to load the second scene with the onStop command, put the onStop command on your first scene and make the event listener load bomb_mc when it stops. you wont be able to notice it unless you export the swf, i dont think you can preview it?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.