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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.