Ok, here goes, but it’s a little bit complicated. If your new to this, go have a look at the original tutorial I followed here 1st.
Basically, I wanted 2 create a Speaker that not only stopped and started sound but played Music On/Music Off text and also played speaker waves reducing and increasing on clicks. It took me 2 LONG WEEKS to overcome all the glitches and road-blocks (and with NO help from these forums), but heres how I did it:
Pic 1: Music ON on Roll Off
Pic 2: Music ON on Release/Roll Over
Pic 2: Music OFF on Release/Roll Over

*Note: I left out 1 state from the picture above. The RollOff state for music OFF. That would obviously be a speaker with no Waves in opaque White (Alpha 50%) like the picture at the top. ***
Create 4 Layers:**

- Actions
- Buttons
- Invisible button
- Tweens (This will be an MC buttons reference on clicks to play animations.)
**
Create an MC and set it up with layers Similar to this: **

Ok, now basically what you see above is 2 sets of animations. “musicOff” which will play soundwaves reducing and fade in and out “MUSIC OFF” text…And “musicOn”, which of course will play soundwaves increasing and fade “MUSIC ON” in and out. I’ve also named the instance of my MC as “speakerTweens”.
**
Back to the main timeline…**

Basically, on each On/Off button in the speaker Hits layer I created 4 standard button states. Ie: Off, Over, Release and Hit. You can use whatever colours you want for these, it’s really up to you.
**The basic principle is:
**That the the first one represents Music ON (Full Waves) and the second one Music OFF (No Waves). Ive also created an Invisible button (3 Frames long) to allow the animation of Waves Increasing to play, because keep in mind the ON button is speaker with FULL waves, therefore that wouldn’t allow us to see the “waves increasing” animation if it jumped to this button immediately after previous button was clicked…Understand?
**ActionScript:
Actions Layer:
Frame 2 (See above):
Note: Placing this on 1st (or 2nd) frame will allow music to play automatically on site load. Rename “your_sound_name” with whatever name you’ve given your track or loop in the “linkage” properties in Library. If you don’t know how to link music, search the tutorials on this site.*
my_sound = new Sound();
my_sound.attachSound("your_sound_name");
my_sound.start(0, 1000);
**At the end of each Button on Actions layer (See above):
**
stop();
**On Invisible Button:
**
on (release) {
gotoAndPlay("off");
}
On Button 1 (Just after frame labelled “on”):
on (release) {
gotoAndPlay("off");
}
on (release) {
tellTarget ("_root.speakerTweens") {
gotoAndPlay("musicOff");
}
}
on (release) {
stopAllSounds();
}
Note: “speakerTweens” is the instance name I’ve given to my animations MC.
***Code on Button 2 **(Frame labelled “off”):
on (release) {
gotoAndPlay("on");
}
on (release) {
tellTarget ("_root.speakerTweens") {
gotoAndPlay("musicOn");
}
}
on (release) {
_root.my_sound.stop();
}
…And voila. That’s pretty much it. An animated speaker button!
I’ll create a proper tutorial on this when I get some spare time.
Any questions until then , just ask me. I’ll be happy to help.
Cheers,
Dallas. 