Jump to content


Tiago Dias's Progressive Flash Video Player


  • You cannot reply to this topic
3 replies to this topic

#1 fzncloud

    Young Padawan

  • Members
  • Pip
  • 11 posts

Posted 12 April 2006 - 10:19 PM

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

#2 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

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):
//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 :D

Edited by funkysoul, 13 April 2006 - 05:17 AM.


#3 fzncloud

    Young Padawan

  • Members
  • Pip
  • 11 posts

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!!! :D

#4 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 13 April 2006 - 06:08 AM

you welcome :D





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users