A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [RESOLVED] Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.

Threaded View

  1. #1
    Junior Member
    Join Date
    Mar 2007

    resolved [RESOLVED] Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.

    okay. i have been trying to debug this error for the past day and a half. i added a
    Actionscript Code:
    xmlLoader.addEventListener (IOErrorEvent.IO_ERROR, onError);
    function onError (e:IOErrorEvent):void
        //do nothing
    with not such luck. below i will show you my code. my thumbs are appearing as well as my descriptions for my //big picture. however, no //big picture when i click on my thumb. any help would well...help! thanks!!!!

    my code:

    Actionscript Code:
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    var fadeTween:Tween;

    var imageText:TextField = new TextField();
    var imageLoader:Loader;
    var xml:XML;
    var xmlList:XMLList;
    var xmlLoader:URLLoader = new URLLoader();

    xmlLoader.load (new URLRequest("data/images.xml"));
    xmlLoader.addEventListener (Event.COMPLETE, xmlLoaded);
    //trash the IOErrorEvent
    xmlLoader.addEventListener (IOErrorEvent.IO_ERROR, onError);
    function onError (e:IOErrorEvent):void
        //do nothing
    //load the thumbs
    function xmlLoaded (event:Event):void
        xml = XML(event.target.data);
        xmlList = xml.children();
        for (var i:int = 0; i < xmlList.length(); i++)
            imageLoader = new Loader();
            imageLoader.load (new URLRequest(xmlList[i].attribute("thumb")));
            imageLoader.x = 25;
            imageLoader.y = i * 60 + 50;
            imageLoader.name = xmlList[i].attribute("source");
            addChild (imageLoader);
            imageLoader.addEventListener (MouseEvent.CLICK, showPicture);
            buttonMode = true;
            trace (imageLoader.name = xmlList[i].attribute("source"));


    //add big picture
    function showPicture (event:MouseEvent):void
        imageLoader = new Loader();
        imageLoader.load (new URLRequest(event.target.name));
        imageLoader.x = 200;
        imageLoader.y = 25;
        fadeTween = new Tween(imageLoader,"alpha",Regular.easeOut,0,1,1,true);
        addChild (imageLoader);
        trace (imageLoader.load(new URLRequest(event.target.name)));
        //add text descrip.
        imageText.x = imageLoader.x;
        imageText.y = 351;
        for (var j:int = 0; j < xmlList.length(); j++)
            if (xmlList[j].attribute("source") == event.target.name)
                imageText.text = xmlList[j];

        imageText.autoSize = TextFieldAutoSize.LEFT;
        addChild (imageText);

    my XML:

    <image source="images/Image1.jpg" thumb="thumbnails/akc_sink.jpg">Description of image 1.</image>
    <image source="images/Image2.jpg" thumb="thumbnails/akc_streetWater.jpg">Description of image 2.</image>
    <image source="images/Image3.jpg" thumb="thumbnails/eirian_org_girl.jpg">Description of image 3.</image>
    <image source="images/Image4.jpg" thumb="flyingbynight_wordpress_inbed.jpg">Descript ion of image 4.</image>
    <image source="images/Image5.jpg" thumb="thumbnails/petmd_com_lounge.jpg"> Description of image 5.</image>
    <image source="images/Image6.jpg" thumb="thumbnails/scroope_netFace.jpg"> Description of image 5.</image>
    Last edited by cyclotron_19; 07-18-2012 at 05:37 PM. Reason: + XML

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center