Copy link to clipboard
Copied
Hello,
I know this question has been asked before but I am not getting any results from the previous answers. My code is very simple, not even complete yet. This is actually a tutorial I am following for class. My instructor sent us mp3 files to download and I keep getting this error:
Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error. at MP3_Player_fla::MainTimeline/frame1().
I have already read that one solution someone had was to change text behavior from multiline to single line and that fixed it. Well in static text, the behaviors are set to multiline and greyed out. My coding is below, someone please help me!!!
import flash.net.URLRequest;
import flash.media.Sound;
import flash.events.Event;
var audioLoader:URLRequest = new URLRequest ("carmina");
var s:Sound = new Sound();
s.load(audioLoader);
s.addEventListener(Event.COMPLETE, songReady);
function songReady(evt:Event):void {
trace("song ready");
}
Hi.
This error is not related to text fields or text fields types. The error is saying that the path to the song you're trying to load is wrong. In your case, you're missing the extension. Also, you're missing a play call.
Try this:
...import flash.net.URLRequest;
import flash.media.Sound;
import flash.events.Event;
var audioLoader: URLRequest = new URLRequest("carmina.mp3"); // ADD THE EXTENSION HERE
var s: Sound = new Sound();
s.load(audioLoader);
s.play(); // ADD THIS LINE
s.addEventListener(Event.COMPLET
Copy link to clipboard
Copied
Hi.
This error is not related to text fields or text fields types. The error is saying that the path to the song you're trying to load is wrong. In your case, you're missing the extension. Also, you're missing a play call.
Try this:
import flash.net.URLRequest;
import flash.media.Sound;
import flash.events.Event;
var audioLoader: URLRequest = new URLRequest("carmina.mp3"); // ADD THE EXTENSION HERE
var s: Sound = new Sound();
s.load(audioLoader);
s.play(); // ADD THIS LINE
s.addEventListener(Event.COMPLETE, songReady);
function songReady(evt: Event): void
{
trace("song ready");
}
Regards,
JC
Copy link to clipboard
Copied
Thank you soo much! Just adding the extension made the difference! My instructor stated to copy the name of the file exactly how it was so that's what I did. Words are very powerful if not used correctly. Thanks a bunch for your help though!!
Copy link to clipboard
Copied
Excellent!
You're welcome!
Copy link to clipboard
Copied
un tengo un problema de un codigo de error 2042 y 2032 en el streaming de mp3 de animate cc 2018
Copy link to clipboard
Copied
You have an incorrect path and/or file name.
First, double check your spelling and your paths. Then make sure your load target's path is relative to the location of your swf's embedding html file's location, if you are testing by opening the html in a browser. If you are testing in the Flash IDE or testing by opening the swf directly, the path should be relative to the swf.