What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

how to stop sound on flash?


spidey06

Member
Messages
11
Likes
1
Hi everyone!

I have created different buttons on flash and I wanted it to have different sounds playing on each one when you hover the mouse over it and stop playing sound when you roll out. All I need is the correct code and where to place it :) thank you!
 
Here's the code :

  1. on (rollOver) {
  2. mySound = new Sound()
  3. mySound.loadSound("song1.mp3");
  4. mysound.start();
  5. }
  6. on (rollOut) {
  7. mySound.stop();
  8. mySoundPosition = 0;
  9. }

you didn't mention if you're working with AS 2.0 or AS 3.0 ?
 

Back
Top