Share this Page URL
Help

Chapter 8. Controlling Sound > Modifying Independent Sounds - Pg. 290

Controlling Sound 290 Figure 8.12. The setPan method requires the pan parameter, a number between ­100 and 100. 6. In the Expression field, replace the pan parameter with a number between -100 and 100 (Figure 8.13). (This single number controls the balance between left and right speakers.) Figure 8.13. The pan for the mySound sound object is set at 100, so all of its sounds play out of the right speaker. 7. Test your movie. When you play your sound, then release this button, the right-left balance changes according to the pan parameter. Modifying Independent Sounds When you instantiate your sound object and do not specify a target parameter, such as mySound = new Sound (), then the setVolume and setPan methods will have a global effect, controlling all the sounds in the root Timeline. Even if you create two separate Sound objects like the following,