Can someone help me fix this error, please?
Error in detail:
Frame 3 code:Code:Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error. at Mp3Player_fla::MyMp3Player_1/frame3() at flash.display::MovieClip/gotoAndStop() at Mp3Player_fla::MyMp3Player_1/xmlLoaded() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete() Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error. at Mp3Player_fla::MyMp3Player_1/frame3() Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error. at Mp3Player_fla::MyMp3Player_1/frame3() Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error. at Mp3Player_fla::MyMp3Player_1/frame3() Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error. at Mp3Player_fla::MyMp3Player_1/frame3() Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error. at Mp3Player_fla::MyMp3Player_1/frame3()
Not sure if any other code would be needed to resolve this. Any replies are grateful.Code:// CODE FOR FRAME 3 //////////////////////////////////////// stop(); var snd:Sound = new Sound(); var channel:SoundChannel; var context:SoundLoaderContext = new SoundLoaderContext(5000, true); snd.load(songURL, context); channel = snd.play(pausePosition); // Start playing // Playlist item click listener List.addEventListener(Event.CHANGE, itemClick); // Playlist item click function function itemClick (event:Event):void { channel.stop(); // stop play status_txt.text = "Now Playing: " + event.target.selectedItem.label + ".mp3"; trackToPlay = event.target.selectedItem.songString; gotoAndPlay(2); } /////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Stop Button Listener stop_btn.addEventListener(MouseEvent.CLICK, stopPlayer); // Stop Button Function function stopPlayer (event:MouseEvent):void { channel.stop(); } /////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Event Listener for sound complete when any song finishes channel.addEventListener(Event.SOUND_COMPLETE, onCompletePlayback); // Function inSoundComplete function onCompletePlayback (event:Event):void { newTrack(); } // New track play function function newTrack():void { if (List.selectedItem.songNum == i) { // if songNum == total track amount channel.stop(); // stop the player var selectFirst = new Array (0,0); // array for cell select List.selectedIndices = selectFirst; // This selects song 1 trackToPlay = List.selectedItem.songString; // Define New track to play gotoAndPlay(2); // Make the switch and play } else { channel.stop(); // stop the player var sn:uint = List.selectedItem.songNum; // var that has value of current list songNum var selectNext = new Array (sn,sn); // array for cell select List.selectedIndices = selectNext; // This selects next song in the list component trackToPlay = List.selectedItem.songString; // Define New track to play gotoAndPlay(2); // Make the switch and play } // Always set pausePosition back to 0 here pausePosition = 0; }/// Close newTrack function ////////////////////////////////////////////////////////////////////////////////////
Not sure if you need to see the xml, but here it is:
Code:<?xml version="1.0" ?> <XML> <Song> <songArtist>"Tiesto"</songArtist> <songTitle>"01 I Will Be Here (Tiesto Remix)"</songTitle> </Song> <Song> <songArtist>"Tiesto"</songArtist> <songTitle>"02 Its Not The Things You Say (Ali Wilson Remix)"</songTitle> </Song> <Song> <songArtist>"Tiesto"</songArtist> <songTitle>"03 Who Wants To Be Alone (Pillip D Remix)"</songTitle> </Song> </XML>


Reply With Quote



Bookmarks