/ Published in: ActionScript 3
Expand |
Embed | Plain Text
import flash.media.Sound; import flash.media.SoundChannel; somebutton.addEventListener(MouseEvent.CLICK,playSound); var channel:SoundChannel; var snd:MySnd; //MySnd is the class name of the sound file in the library. snd = new MySnd(); function playSound(e:Event = null) { channel = snd.play(); }
You need to login to post a comment.
