Hey guys,
Ive been working on Tiago Dias's "Progressive Flash Video Player" and have finally finished the tute! (its awesome!). I've been trying to make a volume control or even a mute/unmute button but i cant seem to get it working (just started learning flash this semester at uni so i dont know much >.<) Does anybody know how to do this and can help me? The closest i have come to making anything different was stopAllsound but i cant get it back on >.< Please help~
Thanks in advance!
Regards
CLoud
Tiago Dias's Progressive Flash Video Player
Started by fzncloud, Apr 12 2006 10:19 PM
3 replies to this topic
#1
Posted 12 April 2006 - 10:19 PM
#2
Posted 13 April 2006 - 05:17 AM
First you need to attach the sound to an empty movieclip, that can be done with this snippet (code goes into maintimeline):
now you have a variable called "so", which is connected to the soundstream of the video.
Then you create your nice mute button, and give it an unique instance name like "muteButton". In the maintimeline put this code
there you go, you have a mutebutton now
//AttachSound to MovieClip
_root.createEmptyMovieClip("vSound", _root.getNextHighestDepth());
vSound.attachAudio(ns);
var so:Sound = new Sound(vSound);
now you have a variable called "so", which is connected to the soundstream of the video.
Then you create your nice mute button, and give it an unique instance name like "muteButton". In the maintimeline put this code
muteButton.onRelease = function() {
if (so.getVolume() == 100) {
so.setVolume(0);
} else {
so.setVolume(100);
}
};
there you go, you have a mutebutton now
Edited by funkysoul, 13 April 2006 - 05:17 AM.
#3
Posted 13 April 2006 - 05:37 AM
HoLy Bananas! Thank you soOo much!! (took you moments where as several days for me AHahah) thankyou thankyou thankyou!!!
#4
Posted 13 April 2006 - 06:08 AM
you welcome
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
