// Muting and UnMuting the sound of our video.
step 1. Place a button on the stage from the component library.
step 2.Label it as "Mute". Name is as "mute_btn".
step 3. _root.getVolume return the current volume of our movie. So if _root.getVolume>0 the we need to mute the movie else UnMute it.
//code will as follows
mute_btn.onRelese=function()
{
if(_root.getVolume==0)
{
_root.setVolume=100;
mute_btn.label="Mute";
}
else
{
_root.setVolume=0;
mute_btn.label="UnMute";
}
}
|
My Blog Title
|