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

Chapter 11. Working with Sounds > Playing and Stopping Sounds

Playing and Stopping Sounds

Whenever you place sounds in a Flash document, it's nice to give your visitors control over the playing and stopping of a specific sound. Giving visitors control over a Flash movie gives them more confidence. Most marketing studies show that if a visitor has more confidence over a Flash document, they'll stay longer. If it's a marketing document, that confidence translates into a greater chance that the visitor will buy what you're selling. If it's a training document, the visitor is more likely to listen to what you're saying, and learn from it. Remember, control leads to confidence, and to better Flash documents.

Play and Stop Sounds

Select a sound in the Library.

Click the Library Options button, and then click Linkage.

Check Export For ActionScript, and then click OK.

Select a layer to place the sound.

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

Enter the name of the sound in the Linkage ID field.

Give the file a unique instance name.

Clear the Play This Sound When Loaded check box.

Click OK.

Place a Play and Stop button on the Stage.

Click the Play button.

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

Enter the name of the sound instance to play.

Click OK.

Select an Event to play the sound.

Click the Stop button.

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

Enter the name of the sound instance to stop.

Click OK.

Select an Event to stop the sound.

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


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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