Skip to main content
Participant
December 1, 2012
Answered

How to stop sound overlapping after clicking the button to go back to the previous label?

  • December 1, 2012
  • 1 reply
  • 5837 views

Hi!

I'm a novice and now making a five-page interactive book with Flash CS5.5 ans ActionScript 3.0. I'm using buttons to navigate the pages.

I've assigned each page as label1, label2, label3, label4, label5. Each label contains several movie clips (with sounds.)

When I click the button to go to the next label, everything works fine. But when I click the button to go back to previous labels, all the sounds start to play at onece and overlap with each other.

I made a simple FLASH file as an example to explain what I mean.

SOUND OVERLAPPING SAMPLE.FLV

This is the problem I'm having right now.

SWF FILE:

http://dl.dropbox.com/u/11630261/FLASH/Sound%20Overlapping%20sample.swf


Please help me! I've searched the internet and  the books I have but still can't find a solution to this

Thanks for your time! And please excuse my english.

This topic has been closed for replies.
Correct answer kglad

if you have (or should have), at most, one sound at any one time, you can use:

SoundMixer.stopAll();

before starting each sound. 

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
December 1, 2012

if you have (or should have), at most, one sound at any one time, you can use:

SoundMixer.stopAll();

before starting each sound. 

CamillePDAuthor
Participant
December 1, 2012

Thank you for your response.

In my file, I put my sound into one of the layers under the movieclip timeline.

How do I insert the action you mentioned?

I've created an action layer and insert the code in the script pane, but it just stops all the sound at fist. I'm sure I did wrong, but I don't know how to fix.

kglad
Community Expert
Community Expert
December 1, 2012

that code won't do what you want when placed on the keyframe that instantiates a sound attached to that keyframe.

probably if you assign all your sound's sync property to stream, that will prevent the cacophony.