Skip to main content
Participating Frequently
July 13, 2010
Question

Make sound play on click - Help please

  • July 13, 2010
  • 1 reply
  • 882 views

The sound only plays when I hold the mouse button down. I need  it to play when I click it. But it has to stop the sound from  playing twice

import flash.media.SoundMixer;
this.addEventListener(MouseEvent.MOUSE_UP,f);
function f(e:Event):void{
SoundMixer.stopAll();
}


here is a link to my swf file

uploading.com/files/5fa52cbf/BukLauGoodMp3.swf/


thank you

This topic has been closed for replies.

1 reply

markerline
Inspiring
July 13, 2010

doesn't look like you're using a Mouse Click event anywhere.  You might want to start with that.

Participating Frequently
July 13, 2010

I did  try .CLICK MOUSE_UP and MOUSE_DOWN, they all play when the mouse is held down and as soon as you release the mouse it stops playing the sound.

it was so simple in AS1 and AS2

thanks for the help

Participating Frequently
July 13, 2010

bump