Background music starts another one when movie clip replays.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mickey Flores
    New Member
    • Sep 2008
    • 1

    Background music starts another one when movie clip replays.

    I have just tried to attach a background sound with on/off button to my movie clip at frame 1 of the main Timeline.

    Flash Movie: the movie will keep on replaying until a viewer clicks a button.
    (frame 1 to 7)


    Problem: the background sound plays again on top of the ancient one. And as the movie starts again, one more piece will be played, and so on.


    I've tried to use different approach with action script but no luck, Please help.
  • bnashenas1984
    Contributor
    • Sep 2007
    • 257

    #2
    Hi
    You didn't say what version of AS you are using.

    If it's AS3 then try to stop all playing sounds before openning a new channel by using this code:

    Code:
    SoundMixer.stopAll();
    Add this line before any sound command to stop all playing sounds.

    I think the problem with your script is that when it goes to the begining, the other sounds are still running. That means the user needs to stop the sound and then play another one. But if you add this line the script will automaticaly stop all sound before playing the new one

    Comment

    • thesmithman
      New Member
      • Aug 2008
      • 37

      #3
      just a suggestion: you may want to consider embedding the .swf that repeats inside the .swf that plays the music, or embedding both files inside a third. This should give you more control over the sound by keeping audio playback independent from video looping.
      have fun!

      Comment

      Working...