Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //////// music play/stop button alternate code
- bt_play.addEventListener(MouseEvent.CLICK, musicplay);
- bt_stop.addEventListener(MouseEvent.CLICK, musicstop);
- //fruitsparfait = name of music file, after changing to actionscript in library//
- var musicfile:Sound = new(fruitsparfait);
- var myChannel:SoundChannel = new SoundChannel();
- function musicplay(event:MouseEvent):void {
- myChannel = musicfile.play();
- }
- function musicstop(event:MouseEvent):void {
- myChannel.stop();
- }
- https://78.media.tumblr.com/8c9506a9445d260be0b6ad80fe8f2558/tumblr_ovsyttBzwK1r967hko2_250.gif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement