Shop Mobile More Submit  Join Login
Here's a spiffy little mute-button tutorial for all you lovely flash designers.

Originally just for :iconcronobreaker: and his new cartoonwork, I got a little carried away. Now it's a bit of... Well... Everything!

Enjoy!
Add a Comment:
 
:iconnoteddreams:
NotedDreams Featured By Owner Jun 11, 2014  Student General Artist
Ok I'm pretty sure I'm missing something obvious, but how do I name my music in flash? I labeled it in actionscript like you said, but my music still plays. Does "blah = new Sound ();" automatically label the music? How does flash know which music file to play/stop in the button? 
Reply
:icontrinitysage:
TrinitySage Featured By Owner May 6, 2014  Hobbyist Writer
wooow, awesome! I was chair dancing at the end, hehe
Reply
:iconalexdachshund:
AlexDachshund Featured By Owner Nov 16, 2011  Hobbyist Digital Artist
I did this tutorial and I'm having problems. For some reason, when I click the mute button, it mutes like supposed to but I click it again and the music won't turn back on D:
Reply
:iconantonyc:
AntonyC Featured By Owner Nov 16, 2011
Hmm.
Are you sure you have created two buttons?
Reply
:iconalexdachshund:
AlexDachshund Featured By Owner Nov 16, 2011  Hobbyist Digital Artist
No, I don't think it said to o.O Unless I read wrong.
Reply
:iconantonyc:
AntonyC Featured By Owner Nov 16, 2011
Oh but that's the point.
You need two buttons: One with the script to turn the volume down to zero and another to turn it back up to 100.
(The script for each button is identical except for the numbers '0' and '100').

The next step is combining the two into one movie symbol, but make sure you can get the two buttons working first.
Reply
:iconalexdachshund:
AlexDachshund Featured By Owner Nov 16, 2011  Hobbyist Digital Artist
Ah I don't know how to do any of that :/
Reply
:iconantonyc:
AntonyC Featured By Owner Nov 16, 2011
Oh sure you can!
You made one button, yeah?
Now make another. -one that has setVolume(100); instead of setVolume(0);

Then you can just have two buttons on the stage; an 'on' and an 'off' button.

See if that works. :)
Reply
:icondemonchick25:
demonchick25 Featured By Owner Aug 3, 2011  Hobbyist Digital Artist
this is amazingly helpful~
Thank you so much
Reply
:iconphitus:
PhiTuS Featured By Owner May 14, 2011  Professional Filmographer
Oh good. Now I don't have to have a dedicated button that plays the song several times every time you press it.
Reply
:icongeekasaur:
Geekasaur Featured By Owner Nov 20, 2010  Hobbyist General Artist
question o:
How do you start a track from the middle? Is there a way? Or would you mute it till you get to the part you want? xD
Reply
:iconantonyc:
AntonyC Featured By Owner Nov 21, 2010
Hm.
Do you want a button to activate a sound file from half way through?
There are a few ways of doing that. :)
If you don't feel like cutting the track in half before you import it into flash, the easiest way would probably be to put the whole tune into it's own movieclip.
Put the movieclip onto the main stage somewhere -you might want to stick some graphic in there to help you locate it- and instantiate it (That is; give it a name in the properties box, say, "soundclip")
Next, inside the clip, goto the first frame and give it a stop(); action. Next, set the track to "stream" in the properties box before giving the frame at which you wish the song to start a name (lets say, "start").

Finally, go back to your play button and tell it to direct soundclip's timeline with this script:

on (press) {_root.soundclip.gotoAndPlay("start");}

When pressed the button should now tell flash to look for the stage (_root), look for "soundclip", and tell it's playhead to start playing at frame labelled "start".

Hopefully this will be right where you want the track to begin.

Ciao!^^
Reply
:icongeekasaur:
Geekasaur Featured By Owner Nov 21, 2010  Hobbyist General Artist
Ohey, thank you very much! Cx
Reply
:iconjkn0w:
JKn0w Featured By Owner Nov 3, 2010   Digital Artist
haha...that's cool! =o)
Reply
:iconzeranote17:
zeranote17 Featured By Owner Sep 27, 2010
wow! this is great! this will definitely help in my flash projects soon
Reply
:iconzeranote17:
zeranote17 Featured By Owner Sep 27, 2010
wow, you made it great! this will definitely help me out on flash
Reply
:iconl-tigress:
L-Tigress Featured By Owner Sep 26, 2010
LUCKY STAR!!!
Reply
:iconbesiegerhomlok:
BesiegerHomlok Featured By Owner Jul 31, 2010  Hobbyist General Artist
woOow..
You're a great animator!:D
Reply
:iconantonyc:
AntonyC Featured By Owner Aug 2, 2010
O.O!
Thanks! :rofl:
Reply
:iconmrlittlebigplanet:
MrLittleBigPlanet Featured By Owner Jun 26, 2010
freaking amazing :O
Reply
:iconantonyc:
AntonyC Featured By Owner Jul 1, 2010
:D
Awesome. Thanks!
Reply
:iconjujudoremi:
Jujudoremi Featured By Owner Apr 10, 2010  Student General Artist
OO amazing

It's a very good job and I love It ^^
Reply
:iconantonyc:
AntonyC Featured By Owner Apr 12, 2010
Awesome. Thanks!
Reply
:icongalahad12655:
galahad12655 Featured By Owner Apr 8, 2010
I don't have flash but I'm faving for that spectacular dance at the end *^* XD
Reply
:iconantonyc:
AntonyC Featured By Owner Apr 12, 2010
:boogie:
Reply
:iconcronobreaker:
cronobreaker Featured By Owner Apr 7, 2010  Professional Digital Artist
Dude, that's mad! You really did go all out! It'll totally come in handy for future projects, thanks so much :D
Reply
:iconantonyc:
AntonyC Featured By Owner Apr 8, 2010
Couldn't have hoped for a better response.^^

Thanks and good luck!
Reply
:iconzaneasylum:
ZaneAsylum Featured By Owner Apr 7, 2010
That was a blast! Very useful too :thumbsup:
Reply
:iconantonyc:
AntonyC Featured By Owner Apr 8, 2010
Hope so!
Thanks for viewing!
Reply
:iconcaat:
caat Featured By Owner Apr 7, 2010  Professional Filmographer
Actionscript never ceases to make my brain hurt, but this tutorial is mighty useful - and that part at the end was a great bonus. The music synchronization and the starfield were some brilliant effects.
Reply
:iconantonyc:
AntonyC Featured By Owner Apr 8, 2010
Awesome! Thankyou. ^^
Reply
:iconpycofrancis:
Pycofrancis Featured By Owner Apr 7, 2010
THAT DANCE WAS AMAZING
Reply
:iconantonyc:
AntonyC Featured By Owner Apr 8, 2010
Hey! Thanks. It's from my Hitchhiker's guide cartoon as one of the Pynki bonuses. Happy hunting!
Reply
Add a Comment:
 
×




Details

Submitted on
April 7, 2010
Image Size
2.2 MB
Resolution
550×400
Link
Thumb
Embed

Stats

Views
2,477 (1 today)
Favourites
99 (who?)
Comments
33
Downloads
94
×