Is there a "pause()" movie clip method, or something equivalent?
Posted on 2006-11-03
I'd like to pause the _root time line for a second or so before jumping to another frame but I don't see any kind or a pause() or delay() function or movieclip method. Is there a way to do this.
"Why would you want to do this?" I hear you ask.
I have a button that causes control to jump between two frames. Each frame is full of ActionScript, complete with sounds that get started periodically. The sounds generated in one frame seem to get started more frequently than they can complete, so a queue gets built up somewhere of sounds that have been started with a mySound.start() but haven't actually played yet. I say this because when I switch to the other frame I still hear about a second of sounds from the frame I'm leaving. This is not good because the sounds don't sync up with the motion in the new frame. I've tried executing a mySound.stop() before leaving the current frame, but this just stops whatever sound is currently playing and doesn't prevent new sounds from being played. My thought was to stop all the timelines, so no more mySound.start()s get executed, when the button issues the play() to get over the stop() in the current frame, and then execute somethihng like a pause(1) before leaving the frame code to let the queued up sounds play out.
Or someone out there may have a much better idea.
Thanks for any suggestions.