Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found

Hi,

I am getting this error when i am trying to load images from an xml document, although the trace gives me the correct URL.
Here’s my code :


var my_list:XMLList;

var myLoader:URLLoader = new URLLoader();
myLoader.load(new URLRequest("LectureXML.xml"));
myLoader.addEventListener(Event.COMPLETE, processXML);


function processXML(e:Event):void {

    var my_xml:XML = new XML(e.target.data);
    my_list = my_xml.*;
    oninit();
}


function oninit():void
{
    
        // running through chapters of my xml
       for each (var chap:XML in my_list..CHAPTER)
       {
         
        // running through videos of each chapter
                for each (var vid:XML in chap..VIDEO)
                {
                        
           // loading and display of thumbs
        loadThumbsAndAdd(vid.@THUMB);
        trace (vid.@THUMB);  // trace gives me the correct url
                        
                }            
       }
}


function loadThumbsAndAdd(url:String):void
{
        //thumb loading
        var loader:Loader = new Loader();
        var request:URLRequest = new URLRequest(url);
        loader.load(request);
        
        
        // add thumb to the display list
        addChild(loader);
        
}


Do you have an idea ?

Thanks.