Animated Music Button Issues (MX). Please Help :)

**Hey guys, **

I’ve got a problem that hopefully has a simple solution. I’m trying to create an animated speaker button (with animated soundwave icon) that automatically plays music loop when the site loads, and allows user to switch music OFF & ON at will (with associated soundwave reducing/increasing animations and colour fading). I have already created the movie clip to perform the following actions (for animation only so far), but I’m having invisible button and scripting issues.

I need to the speaker icon/button to do the following things:

1. Fade from opaque white to blue on rollover and back to opaque white on rollout.

2. On 1st Release: Stop Music, and play sound waves reducing (one-by-one) sequence. On Rollout fade back to opaque white with no soundwaves.

3. On 2nd Release: Play Music and play soundwave increasing (one-by-one) sequence. On Rollout, fade back to opaque white with full soundwaves.

My scripting knowledge is fairly sketchy, so please don’t laugh if I’ve done the wrong thing here: So far, I’ve created a movie clip with a layer for all the necessary animation Actions, a layer for Labels, layer for Actions, and 2 layers for 4 separate invisible Buttons.

Invisible Button 1: Plays fade in to blue (Rollover) and back to opaque white (Rollout) with full soundwaves. On Release stops music and plays soundwave reducing (one-by-one) tween.

Invisible Button 2: Takes over from button 1 to play full blue overlay (No soundwaves) and fades back to opaque white on Rollout.

Invisible Button 3: Plays fade in to blue (Rollover) and back to opaque white (Rollout) with no soundwaves. On Release plays music and plays soundwave increasing (one-by-one) tween.

Invisible Button 4: Takes over from button 3 to play full blue overlay (With soundwaves) and fades back to opaque white on Rollout.

In the Actions layer, I’ve placed “stop” Actions at the end of each animation sequence, and programmed Buttons to “gotoandplay” frame Labels (Labels layer) set at the start of each animation sequence. Now the problem I’m having is that the “hit” spots on the second buttons don’t seem to be taking over from the ones on the first, and I have to roll off and roll back on to the buttons for the actions on the second buttons to take effect. :m: Now I need the buttons to work so that the user can STOP/STOP music (and play associated animations) as many times as they like without rolling off the icon first.

Am I on the right track with the buttons I’ve created or have I gone about this all the wrong way? And if I am on the right track, can anyone tell me how to resolve my problem? I will the link the music later, but just want to get this animation issue sorted 1st.

Thanks in advance.

Dallas. :hugegrin:

For the turning on and off, I would create a variable for telling if the music off. On release, have an if statement to see if the variable is true or false then change the variable and start or stop the music accordingly… And I guess layer invisible movie clips for the graphic effects, I’m not very good at explaining it sorry.

here’s more explanation if you want:

create 2 movie clips to layer over your default white. One (instance name of fade) should have an invisible first frame with stop(); on it, then on the next frames a fade-in of the blue symbol then stop(); when it is completely blue, and on the following frames have a fade-out of the blue. The other movie clip (instance name of waves) should have a first frame with all soundwaves there and a stop action then soundwaves reducing, stop(); when they’re all gone, and after that soundwaves appearing. Put these over your original movie clip of the white symbol (instance name sound symbol). On the frame that the white symbol is in, put this code…


var musicon:Boolean = true;
soundsymbol.onRollOver = function(){
fade.gotoAndPlay("fadein");
}
soundsymbol.onRollOut = function(){
fade.gotoAndPlay("fadeout");
}
soundsymbol.onRelease = function(){
if(musicon){
waves.gotoAndPlay(soundoff);
music.gotoAndPlay(off);
}
if(musicon == false){
waves.gotoAndPlay(soundon);
music.gotoAndPlay(on);
}
}

that’s probably incorrect or confusing, sorry…

Thanks for your help, but I really need a better explanation than that…and just for the graphic effects now. I’ll deal with linking the music later.

Can anyone else please help elaborate on how I can create or repair the animation effects for this button???

And can someone also tell me why the “Paste In Place” (Cntl+Shift+V) function doesn’t work if your copying graphics from a Movie Clip to the main Scene or another Movie Clip? Flash seems to just paste anywhere it wants.

Is there anyway I can overcome this problem?..I’m starting to find this program has quite a few annoying flaws! :m: