Flash - Sound stop playing on Mouse out

  • Wurn
  • Graduate
  • Graduate
  • User avatar
  • Posts: 122
  • Loc: Cape Town

Post 3+ Months Ago

Hey All

Need some help please!

I have Flash file where i have 3 different buttons and each has its own sound playing when you hold your mouse over them. The thing is and its gonna sound stupid but how can i make it so that the if i have my mouse hover over one button and move away from it that the loop will stop playing.

At the moment it plays until its reached its end! I basically want it to play when mouse over and stop playing when mouse out or not over the button.

Ive been working on flash for a while now but never had to use sound that much so the audio thing is new to me.

Some help please THX :P
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Tchuki
  • Mastermind
  • Mastermind
  • Tchuki
  • Posts: 1774
  • Loc: Edinburgh

Post 3+ Months Ago

Code: [ Select ]
on (rollOver) {
mySound = new Sound()
mySound.loadSound("song1.mp3");
mysound.start();
}
on (rollOut) {
mySound.stop();
mySoundPosition = 0;
}
  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. }


That goes on all the buttons but swap the names of the songs around.
  • Wurn
  • Graduate
  • Graduate
  • User avatar
  • Posts: 122
  • Loc: Cape Town

Post 3+ Months Ago

Enigmatic wrote:
Code: [ Select ]
on (rollOver) {
mySound = new Sound()
mySound.loadSound("song1.mp3");
mysound.start();
}
on (rollOut) {
mySound.stop();
mySoundPosition = 0;
}
  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. }


That goes on all the buttons but swap the names of the songs around.


.....


THx for reply will give it a bash!!

and yes it works perfect, thx so much

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 12 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.