0 Replies Latest reply on Mar 7, 2007 5:30 PM by Chris Ivey

    I need to get sound events from sounds embedded in a MovieClip

    Chris Ivey
      I'm working on a SoundManager class for a game development platform. Unfortunately, I can't leverage the Sound class because the requirements are that the sounds for an application would be embedded in individual MovieClip objects and set to stream as the clip plays.

      The idea is that this would allow third-party developers to make simple edits to the sounds by using the envelope controls for the embedded sounds. I can manually fire an event when the sound finishes by calling a custom method in the last frame of the movie clip, however, this is not completely accurate and it makes it impossible to seamlessly loop sounds.

      Now, the Flash player must be aware that the sound has finished playing. I presume that sounds embedded in the IDE are handled by the Sound class in some way. Is there any way at all that I can expose an event when the embedded sound finishes playing?

      I'd really prefer to use another approach, and just attach sound files from a Library or from external files, but I don't have a choice in this particular case. This is the way the application has to work.

      I will probably have to give up on the precision I want in order to complete this job on time, but I refuse to believe that what I'm trying to do is impossible. I would appreciate any help anyone can give me.