• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 11. Working with Sounds > Stopping All Sounds

Stopping All Sounds

Sound can be a great tool, but it can also be a distraction. For example, you have this wonderful background music playing in your Flash document, unfortunately, the person viewing the Flash movie is at work, surrounded by fellow co-workers. What she needs is a way to stop all the distracting sounds. Flash gives you a generic Behavior that will allow you to do exactly that.

Stop All Sounds

Open a Flash source document (.fla) that contains playing audio files.

Place a button object on the Stage, and then click it.

Click the plus (+) sign, located in the upper-left portion of the Behaviors panel, point to Sound, and then click Stop All Sounds.

Click OK.

Select an Event to stop the sound.

Click the Control menu, and then click Test Movie to test the ActionScript.

IMPORTANT When you select the Stop All Sounds behavior, only the sounds playing at that moment will stop. If you have other sounds on the Timeline, they will play when called.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint