volume controls
June 24th, 2007 . by polyGeek![]() |
Watch the video tutorial on how to create volume controls |
The volume controls are comprised of the volumeRange, which can be oriented vertically or horizontally, and the volumeSlider.
The initial volume of the video will depend on the placement of the volumeSlider on the volumeRange. So if you want the volume to automatically be set at 50% then place the volumeSlider in the middle of the volumeRange.
The mute button is a toggle much like the play/pause button. To create a mute button place a MovieClip on the stage with an instance name of either soundon or soundoff. The instance name will determine the mute state when the SWF is loaded. So a mute button with an instance name of soundoff will cause the video to start with the sound off.
Inside of the mute button you can create two states indicated by Framelabels: on/off. When the volume is muted the video.Maru code will cause the mute button to gotoAndStop() on the off Framelabel and visa-vera.
Both volumeSlider and volumeRange support states depending on the state of the mute button - soundoff/soundon. If the volume is muted then, if supplied, the volumeRange/volumeSlider will gotoAndStop() on the muted frame label. When the sound is not muted then the volumeRange/volumeSlider will gotoAndStop() on the first frame of the MovieClip - no Framelabel is needed.








I would like to know if I can add a volume control that when you are done adjusting the volume it will fade out just like the fadeTray.
I just thought that would be a nice effect for my visitors.
@Matt, I’m I missing something? Couldn’t you just put the volume controls in the fadeTray?
It would be fairly simple to write your own code so that when the user rolls over the volume controls they fade in and then fade out when the user rolls off again. I could do a tutorial on that if it would be helpful.
Is there a way to mute the sound of a movie through the xml file?