02.08.08

ActionScript Error #2032

Posted in Error, errors, Flash, Flex at 8:09 pm by Curtis J. Morley

ActionScript Error #2032: Stream Error. URL: /Sound/Amazing.mp3

Description:
This is an ActionScript Runtime Error that you will get if you purposefully trap errors (which I highly recommend you do) while trying to load a file into Flash/Flex. One very simple reason you will get this error is if you have targeted an mp3 or any file incorrectly. This can include php scripts and other external datasources.

Fix:
Make sure that you are targeting the file correctly. In the 'Bad Code' example below I am missing just one letter. Without trapping the errors like I do you will also get AS3 Error #2044: Unhandled IOError Event

Bad Code:

private var snd:Sound = new Sound();
snd.load(new URLRequest("Amzing.mp3"));
snd.addEventListener(IOErrorEvent.IO_ERROR, onSoundIOError, false, 0, true);

function onSoundIOError (e:IOErrorEvent)
{
trace("An Error Occured and it looked like this.", e.text);
}
snd.play();

Good Code:

private var snd:Sound = new Sound();
snd.load(new URLRequest("Amazing.mp3"));
snd.addEventListener(IOErrorEvent.IO_ERROR, onSoundIOError, false, 0, true);

function onSoundIOError (e:IOErrorEvent)
{
trace("An Error Occured and it looked like this.", e.text);
}
snd.play();

Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error.
at SoundControl_fla::MainTimeline/frame1()

Related ActionScript Errors - AS3 Error 2044 Unhandled IOError Event

This ActionScript Error is a quick one. I hope this helps you solve it.

As always Happy Flashing

26 Comments »

  1. Ryan K said,

    February 24, 2008 at 7:42 pm

    what about when you only get the Error (below) when I upload my files to the internet. I have one FLA file and inside the FLA I have a request to a .xml doc to load in my images. The images appear when I test the file in FLash, and when I test my published html page. But as soon as I upload the files to the internet I get the error below. The flash file runs correctly but the images do not appear.
    my page http://www.ii-designs.com/maybe then click on the works tab and where the bottom gray lines is where the images are suppose to be

    I get this error
    Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: file:///private/var/tmp/folders.501/TemporaryItems/AdapterTemp/Server_1/public_html/maybe/data/photoImages.xml at _photoImages/frame1()

  2. Curtis J. Morley said,

    February 28, 2008 at 6:16 am

    Ryan,

    I went to your site and saw what you are talking about. I actually get AS3 Error # 2044 and then AS3 text=Error #2035. This is most likely a problem with your targeting. Make sure that everything is in the exact same situation that it is on your local machine. If you need to change the directory structure then double check all of your references. The last error you posted seems to think that what you are referencing is on a file system rather than on the web. Check your paths and make sure that everything is referenced either with “http://” or locally with a relative path.

    Thanks,
    Curtis J. Morley

  3. Scott said,

    March 28, 2008 at 2:21 pm

    I’ve been having a nightmare trying to make this little project work. I’m trying to use a component called “Accordion Tree Menu V3″ located here: http://www.jumpeyecomponents.com/Flash-Components/Flash-Menus/Accordion-Tree-Menu-V3-36/

    http://www3.meijer.com/petadvisor/petadvisor.html

    This will be viewable here as of Sunday 3/30/2008 at 12:00am EST:
    http://www.meijer.com/catalog/section.jsp?categoryId=222&N=3129&Ns=PRODUCT_HAS_IMAGE|1||PRODUCT_SALE_PRICE|1

    With this menu I’m trying to have the xml file that drives the Tree Menu to load an external text file, render it as HTML and apply CSS styling all while rendering in an easing scrolling text window. I get this error message in the Output window everytime I test the movie in flash. Only about 3 people (out of 20 that have tested it so far have recieved this same error message when the page loads for them. We’ve tested IE6, IE7 FireFox 2, FireFox3 Beta 2, and I think FireFox 3 Beta 4. Again only 3 people have seen this error message. Any input or helpu would be OUTSTANDING and GREATLY APPRECIATED!

    Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: file:///C|/Documents%20and%20Settings/1889718/Desktop/Pet%20Advisor/
    at Copyofpetadvisor_fla::MainTimeline/frame1()

  4. Caleb Griffin said,

    April 19, 2008 at 9:48 am

    I have the simplest code in the world. It’s a play button and a stop button, which play and stop a song on the Media page. The code works but when I leave the page (staying on the site) in Firefox, I get the following …

    Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error.
    at player_fla::MainTimeline/player_fla::frame1()

    As I said, the buttons work in all browsers. The error pops up only in Firefox . Is there a way to use your trick to suppress this error or to fix it? I don’t know ActionScript at all. I got the code from a tutorial. I’m willing to pay for help if this requires a difficult solution.

    Here is the code, which works …

    var music:Sound = new Sound(new URLRequest(“music/01ILikeGuys.mp3″));
    var sc:SoundChannel;
    var isPlaying:Boolean = false;

    stop_btn.addEventListener(MouseEvent.CLICK, stopMusic);

    function stopMusic(e:Event):void
    {
    sc.stop();
    isPlaying = false;
    }

    play_btn.addEventListener(MouseEvent.CLICK, playMusic);

    function playMusic(e:Event):void
    {
    if (!isPlaying)
    {
    sc = music.play();
    isPlaying = true;
    }
    }

  5. sankar.G said,

    July 23, 2008 at 12:23 pm

    i am also have same problem just i read the text from a text file in local but i cant able to done that
    b1_btn.addEventListener(MouseEvent.CLICK,g);
    function g(e1:Event)
    {
    var textRequest:URLRequest = new URLRequest(“e:\sample.txt”);
    var textLoader:URLLoader = new URLLoader();
    textLoader.load(textRequest);
    textLoader.addEventListener(Event.COMPLETE,B);
    }
    function B(ev:Event)
    {
    t1_txt.text=ev.target.data;
    }
    i got this error message
    Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: file:///e:sample.txt
    if any one know the answer send it to me please

  6. george said,

    August 26, 2008 at 1:00 pm

    i was getting this error. i was trying to get httpservice to work.

    i was proxying data from a database with php trying to create xml for AS3 to use. the php file was not producing anything because i had a new install of php and mysql. mysql was not enabled in php (couldn’t see anything about mysql with phpinfo();)

    resolution: had to make changes to the installation of php to add support for the mysql extension.

  7. Horst said,

    September 18, 2008 at 12:14 pm

    Hi
    i get the same (#2044) error:
    Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: file:///C|/Documents%20and%20Settings/Bryony/Desktop/Horst%27s%20Folder/Central%20Europe%20v2.5/en/Central Europe v2_en.xml
    at fl.lang::Locale$/::loadXML()
    at fl.lang::Locale$/initialize()
    at PageHandler$iinit()

    and i understand that this is as a result of my FLA not being able to find the file “en/Central Europe v2_en.xml” but nowhere in my code do i make that request. This error started happening when I added a dynamic text object to FLA app. I’m guessing a need this file for the text rendering but the app runs fine without it so i don’t know whats going on!

    any help would be greatly appreciated!

  8. adam said,

    October 7, 2008 at 9:49 am

    I’m getting the error in this code…i suspect that when i push the buttons from the for loop into the array that the correct name isn’t being passed somehow…i want it to pass “i”, which would be 0, 1, 2, 3, 4 etc. so that I can reference the clicked button to display the correct image in slideLoader.load….specifically this is what i’m trying to get to be a number that corresponds with the correct image… slideBtns.indexOf(e.target.name)

    for (var i:int = 0; i < intSlideCount; i++) {

    var newThumb = this.addChild(new Thumb());
    newThumb.name = i;
    newThumb.x = X + (SPACE * i);
    newThumb.y = Y;

    newThumb.theNum.text = i + 1;
    slideBtns.push(newThumb);
    newThumb.addEventListener(MouseEvent.CLICK, onClick);
    }
    }

    private function onClick(e:MouseEvent):void {
    if(slideTimer.running) {
    slideTimer.stop();
    }

    slideLoader = new Loader();
    slideLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, fadeSlideIn);
    slideLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, showProgress);
    slideLoader.load(new URLRequest(xmlSlideshow..image[slideBtns.indexOf(e.target.name)].@src));
    }

  9. harry said,

    November 5, 2008 at 10:04 am

    Hi,

    I’ve been ages on a 2032 error that i’ve been getting on my site abdrivingschool.ie.

    I’ve visited the site on a couple of machines and it seems to work fine but google is saying there’s something wrong. If you type “ab driving school” into google (i think it’s about the 3′rd result down) you can see that it says :

    Error #2032. RSL Error 1 of 1.
    http://www.abdrivingschool.ie/ – 5k – Cached – Similar pages

    All the text is embedded in the swf so there’s no rpc calls or xml or anything like that but i’ve been getting this error for a while now.

    PLEASE HELP. I’m going crazy

  10. Anil said,

    November 19, 2008 at 3:39 am

    Hi,

    I too get the same error while trying load a local XML file. I even copy-pasted the same URL into my browser, I was able to access the XML. I am still not able to understand why its throwing the Error#2032.

    Here is my code:

    private function LoadXML()
    {
    var loader:URLLoader = new URLLoader();
    loader.addEventListener(Event.COMPLETE, parseXML);
    loader.load(new URLRequest(“/Data/XMLs/DeviceType.xml”));
    loader.addEventListener(IOErrorEvent.IO_ERROR, onError);

    }

    private function onError(e:IOErrorEvent):void{
    trace(e.text);
    }

    private function parseXML(e:Event):void
    {
    var xmlDoc:XMLDocument = new XMLDocument(e.target.data);
    trace(xmlDoc);
    }

  11. Buster said,

    December 5, 2008 at 3:12 am

    Harry I had an Error #2032. RSL Error 1 of 1 problem too for http://www.premierleaguetickets.net/ and i ended up having to revert back to simple old Html. Google just isn’t ready for flex yet

  12. sohrab said,

    December 26, 2008 at 11:30 am

    Hi
    I had same problem with your friend (error #2032)
    my program work good in PC but when I upload in site, error #2032 appeared.
    my mistake was file name,in flash I use eg. filename.php but real file name was Filename.php,
    attention to upper case, some servers are sensitive in character case.
    I hope it be helpful

  13. Roy Remington said,

    February 14, 2009 at 4:51 pm

    Thanks for this info! I was working on a game project and had to create an XML display error myself and have code to catch it. This helped me solve this part of the project! A+ Post

  14. Felix said,

    April 14, 2009 at 3:57 am

    I think some recent Flash version also gives out this error if the headers of the file are wrong. If the server sends the Content-Type as something else than audio/mp3 etc., I think (not very sure) Flash will give an error.

  15. Kenneth said,

    April 27, 2009 at 3:08 am

    @Harry
    The error ‘Error #2032. RSL Error 1 of 1′ from Google is because it cannot execute network requests from the SWF yet.

    You’ll need to turn off the RSL framework to get the site indexed from Google.
    http://kennethsutherland.com/2009/04/27/google-and-swfs/

  16. Azteca13 - P said,

    July 22, 2009 at 6:46 am

    [...] curtismorley.com ActionScript Error #2032 aki podria estar la posible solucion carnal checalo a ver si te sirve [...]

  17. thawootah said,

    August 3, 2009 at 1:59 am

    Ha i just tested my xml gallery app in IE and got this error. And Its not a filename issue.

    I think it has something to do with response time, the size of the file and how many requests your making. It acts like a script timeout.

    Reason: i refreshed the page a couple of times and it loaded fine after IE cached the first few files.

    Too late to figure it out. But i about had enough of screwing around with it.

  18. thawootah said,

    August 3, 2009 at 3:04 am

    Ok wrote a quick php script to resize images to a slightly smaller file size and sure enough no errors when cache is cleared and reloaded.

    it can definitely have something to do with loading back to back images in multiple swfs or the response time your script on the backend takes..

    i guess i can live with it..

  19. Juan Carlos said,

    October 31, 2009 at 10:30 am

    Hi,

    I also got this error #2032 in this code, related to the play/stop audio buttons.

    var music:Sound = new Sound(new URLRequest(“RhythmIsADancer.mp3″));
    var trans:SoundTransform = new SoundTransform(1, -1);
    var channel:SoundChannel = music.play(0, 1, trans);
    var musicOn:Boolean = true
    onOff.addEventListener(MouseEvent.CLICK, onOffSound);
    function onOffSound(e:Event) {
    if (musicOn == true) {
    musicOn = false;
    trans.volume=0;
    SoundMixer.soundTransform = trans;
    } else {
    musicOn = true;
    trans.volume=1;
    SoundMixer.soundTransform = trans;
    }
    }

    Since it seemed to be caused by Flash not being able to get a file, I swapped the filename with its instance name and the first line of the above code was changed in:

    var music:Sound = new websiteSong();

    Now everything’s fine locally, AND on the server: No more annoying error windows.

    I have to say, though, that the error I got wasn’t prejudicial to the functioning of the website; It was just an error window that popped up everytime I clicked the home page, nut the buttons worked perfectly.

    Of course I couldn’t present such glitchy product to the client, so I HAD to find a solution.

    Hope this helps.

    JC

  20. Jojo said,

    December 3, 2009 at 4:14 pm

    lol i’m using as3 for a project, and I’ve never used this before. after a quick google search, it seems this is a very common error, with many various causes. so, even thought I think this is a very noob error, I’ll leave mine.

    I was trying to parse a XML file, which is a easy thing, or so every single tutorial on the web preaches it (no offense to anyone, i’m just pissed because I hate non concise error messages xD).
    it gave me this error, more precisely Error #2044: Unhandled ioError:. text=Error #2032: Stream Error.

    after bumping with my head (a lot) i found out that the xml file i was using was missing this line in the beginning:

    hope this helps anyone…
    >_<

  21. Neviton said,

    January 30, 2010 at 10:06 am

    I faced this issue today, and the problem was to use “\” instead “/” at the URL.

  22. Ankit said,

    February 6, 2010 at 11:09 pm

    When I search http://www.joseparla.com on GOogle I see Error #2032. in description. what is the reason for the same :(

  23. Mike said,

    April 1, 2010 at 2:20 am

    In my case the problem was casing – apparently my server uses case-sensitive file/directory naming. So if you’re trying to access a file in a “Data” directory but the URL you’re using is “data”, you’ll get this error.

  24. danny said,

    January 4, 2011 at 5:14 pm

    aah, thank you so much for this!
    i’ve not used AS3 for a long time..

  25. Lee said,

    December 9, 2011 at 9:02 pm

    Hello,

    Here is a very obscure reason you might get this error:

    IE has a proxy address active. I work at 2 locations, one has a proxy and one doesn’t. When I took my laptop home to work, I started getting this error.

    Apparently Flash uses the IE connection settings. ALso, for those who don’t know, clearing the IE cache clears your Flash IDE cache as well.

    lee

  26. VIKAS said,

    January 25, 2012 at 9:47 am

    Max number of upload retries exceeded: Error #2032: Stream Error. URL: http://upload.facebook.com/media/upload/photos/flash/?ref=profile&__a=1&__user=100000462148801

    Above error is comming while uploading photo.
    pl.do needful

Leave a Comment