Pain Posted October 26, 2011 Share Posted October 26, 2011 Hello everyone. Im trying to make background music play at startup. I also need a play button and a stop button. My music plays, but when i click on stop and then play again, heres what i get: Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error. at MYPROJECT_fla::MainTimeline/frame1() ArgumentError: Error #2068: Invalid sound. at flash.media::Sound/play() at MYPROJECT_fla::MainTimeline/playSound() What does it mean? How can i sort this out? Thank you var mySound:Sound = new Sound(); mySound.load(new URLRequest("pow.mp3")); var channel:SoundChannel = new SoundChannel(); //----Add an event listener to the Play button btnPlay.addEventListener(MouseEvent.CLICK,playSound); function playSound(event:MouseEvent):void { channel = mySound.play() } //----Add an event listener to the Stop button btnStop.addEventListener(MouseEvent.CLICK,stopSound); function stopSound(event:MouseEvent):void { SoundMixer.stopAll(); } Link to comment https://forums.phpfreaks.com/topic/249867-play-button-does-not-work-actionscript-3/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.