- stop();
- var music:Sound = new Sound(new URLRequest("ghostwriter.mp3"));
- var sc:SoundChannel;
- var isPlaying:Boolean = false;
- uit.addEventListener(MouseEvent.CLICK, stopMusic);
- function stopMusic(e:Event):void
- {
- sc.stop();
- isPlaying = false;
- }
- aan.addEventListener(MouseEvent.CLICK, playMusic);
- function playMusic(e:Event):void
- {
- if (!isPlaying)
- {
- sc = music.play();
- isPlaying = true;
- }
- }
SOUND
By: AS3 | Date: May 23 2010 20:00 | Format: None | Expires: never | Size: 423 B | Hits: 855
Latest pastes
8 hours ago
1 days ago
3 days ago
3 days ago
3 days ago