Skip to main content
December 29, 2006
Question

onSoundComplete vs. movie clip event

  • December 29, 2006
  • 2 replies
  • 198 views
Hello and Happy Holidays!

I have a movie that I am trying to sync with some external mp3 files - basically a narrated voice over.

What I am having a problem with is that, depending on which browser, computer, server, act of God, etc seems to be effecting it at the moment, it seems that sometimes the movie clip takes longer to execute than the mp3 and vice versa.

What this means is that I cannot rely on any one specific item to be the determiner of when to move on to the next movie clip. If I use "onSoundComplete" and it finishes before the current movie clip, it cuts the movie clip short. If I rely on the end of the movie clip it may cut the mp3 short. What I am trying to figure out is how to take both into consideration - sort of an "if then" statement. I've racked my brain over this one for hours until my mind is numb.

Any ideas where to start?

many thanks.
This topic has been closed for replies.

2 replies

kglad
Community Expert
Community Expert
December 29, 2006
you're welcome.
kglad
Community Expert
Community Expert
December 29, 2006
under ideal conditions you should be able to determine that if the movieclip plays at a certain frame rate (frames per second), your sound and movieclip will be in-sync.

you can then use actionscript to force your movieclip to maintain that frame rate (using a combination of getTimer() and an onEnterFrame loop).

that may mean your movieclip will need to skip frames to maintain its frame rate, but if you can accept that you will have ideal syncing every time.
December 29, 2006
thanks for this input. I'm not as familiar with these two commands, but I'll give them a try.

thanks.