How to Control the Sound Volume in Flash 8
Flash 8 is a Web-based application authoring tool. Your Flash applications can have sound on them by simply importing your sound to the Library and creating a new ActionScript object in the first frame of your movie. Your sound's volume can then be controlled using the sound object's "setVolume()" method.
Instructions
-
-
1
Open Flash and create a new ActionScript 2.0 document by clicking "File," "New," "Flash ActionScript 2.0 Document."
-
2
Create a new sound by adding the following two lines to the first frame of your movie:
mySound = new Sound();
mySound.loadSound("sound2.mp3", false);Change "sound2.mp3" to the name of the sound file in your Library.
-
-
3
Set your sound's volume use the following line of code:
mySound.setVolume(50);You can input any number between 0 and 100 inside the parenthesis (0 being inaudible and 100 being the loudest the sound file plays) to set how loud the sound file plays.
-
1
References
- Photo Credit The master of a sound image by Aleksey Smagin from Fotolia.com