Flash, button rollover keeps playing on rollout...

I'm using flash, it's been a long time :)

My site is a wordpress site.. at the top you can see the flash banner


Is there a way to stop my button from playing sound after they roll over?

I want my stuttering mayor to stop making sounds if they rollout...

How can I accomplish this? Eventually I'll have multiple political weasels on my flash file, so I'd like viewers to be able to scroll over each head and hear them talk, without the heads talking over eachother...

Also, if there's a way to make the flash file with a transparent back ground that would be even better!


Who is Participating?
blue-genieConnect With a Mentor Commented:
1. take the audio out of the frame
2. have a look here on how to create a sound object


3. use your event listeners for MOUSE_OVER and MOUSE_OUT to call snd.play() and sound.stop();

you might also want to have a look at stopping your animation as well, when you roll out your animation goes funny.
FlassariConnect With a Mentor Commented:
On the roll-over frame of the button, make the sound a "start", not an "event".
On the first frame of the button, make the sound a "stop".

Now when the user removes the mouse from the button the sound should stop.
FlassariConnect With a Mentor Commented:
To make the background of the flash movie transparent, add WMODE="transparent" in the html where you declare your swf.

Be advised that doing that will make the swf a little slower on movies with intensive graphics, but it doesn't look like you'll be running into that problem in this case.
All Courses

From novice to tech pro — start learning today.