Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var rosesRoom:music = new music();
- var MusicChannel:SoundChannel = new SoundChannel();
- var pausePosition:int = MusicChannel.position;
- MusicChannel = rosesRoom.play(0, 9999999);
- toggle_btn.gotoAndStop(46);
- var clickOnce:uint=0;
- toggle_btn.addEventListener(MouseEvent.CLICK, togglePlay);
- function togglePlay(event:MouseEvent):void
- {
- clickOnce++;
- if (clickOnce==1)
- {
- toggle_btn.gotoAndPlay(47);
- MusicChannel.stop()
- }
- if (clickOnce==2)
- {
- MusicChannel=rosesRoom.play(pausePosition, 9999999);
- toggle_btn.gotoAndPlay(1);
- clickOnce=0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement