Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

New Here ,
Dec 01, 2012 Dec 01, 2012

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.

TOPICS
ActionScript
5.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Dec 01, 2012 Dec 01, 2012

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

SoundMixer.stopAll();

before starting each sound. 

Translate
Community Expert ,
Dec 01, 2012 Dec 01, 2012

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

SoundMixer.stopAll();

before starting each sound. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 01, 2012 Dec 01, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 01, 2012 Dec 01, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 01, 2012 Dec 01, 2012

Oh I finally realized what you meant!!!

Thanks a million!!!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 01, 2012 Dec 01, 2012
LATEST

you're welcome.

p.s. please mark helpful/correct responses.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines