Load xml from serverside script

Been having some trouble with the dreaded 2032 error ranging from images to serverside script paths.

For a test brining things outside of my application here is the basics:

I have 3 test urls (which all work in a browser):

  1. An image at “http://127.0.0.1/data/users/22/LRG_050225G2hw.jpg

  2. A dynamic generated XML page: “http://127.0.0.1/scripts/GetUserLeadPhotoForFlash.aspx?xml=1

  3. A same page but with parameter functionality removed: “http://127.0.0.1/scripts/GetUserLeadPhotoForFlash.aspx

TEST 1: Load the image url from test url no 1
[AS]
var imgUrl:String = “http://127.0.0.1data/users/22/LRG_050225G2hw.jpg”;
var myImageUrl:URLRequest = new URLRequest(imgUrl);
var myLoader:URLLoader = new URLLoader(myImageUrl);

myLoader.addEventListener(IOErrorEvent.IO_ERROR, catchIOError);
function catchIOError(event:IOErrorEvent){
trace("Error caught: "+ event.type);
trace("event: " + event);
}
[/AS]

Result: Works fine, as expected

TEST 2: Load the xml url from test url no 2
[AS]
var myXML:XML = new XML();
var XML_URL:String = “http://127.0.0.1/scripts/GetUserLeadPhotoForFlash.aspx?xml=1”;
var myXMLURL:URLRequest = new URLRequest(XML_URL);
var myLoader:URLLoader = new URLLoader(myXMLURL);

myLoader.addEventListener(IOErrorEvent.IO_ERROR, catchIOError);
function catchIOError(event:IOErrorEvent){
trace("Error caught: "+ event.type);
trace("event: " + event);
}
[/AS]

Result: ERROR
Error opening URL ‘http://127.0.0.1/scripts/GetUserLeadPhotoForFlash.aspx?xml=1
Error caught: ioError
event: [IOErrorEvent type=“ioError” bubbles=false cancelable=false eventPhase=2 text=“Error #2032: Stream Error. URL: http://127.0.0.1/scripts/GetUserLeadPhotoForFlash.aspx?xml=1”]

TEST 3: Load the xml url from test url no 3
[AS]
var myXML:XML = new XML();
var XML_URL:String = “http://127.0.0.1/scripts/GetUserLeadPhotoForFlash.aspx”;
var myXMLURL:URLRequest = new URLRequest(XML_URL);
var myLoader:URLLoader = new URLLoader(myXMLURL);

myLoader.addEventListener(IOErrorEvent.IO_ERROR, catchIOError);
function catchIOError(event:IOErrorEvent){
trace("Error caught: "+ event.type);
trace("event: " + event);
}
[/AS]

Result: ERROR
Error opening URL ‘http://127.0.0.1/scripts/GetUserLeadPhotoForFlash.aspx?xml=1
Error caught: ioError
event: [IOErrorEvent type=“ioError” bubbles=false cancelable=false eventPhase=2 text=“Error #2032: Stream Error. URL: http://127.0.0.1/scripts/GetUserLeadPhotoForFlash.aspx?xml=1”]

ALSO TRIED

Tried two more and no joy
[AS]
var request:URLRequest = new URLRequest();
request.url = “http://127.0.0.1/scripts/GetUserLeadPhotoForFlash.aspx”;
request.method = URLRequestMethod.GET;
request.data = new URLVariables(“xml=1”);
var myLoader:URLLoader = new URLLoader(request);
[/AS]

and

[AS]
var myXMLURL:URLRequest = new URLRequest(“http://127.0.0.1/scripts/GetUserLeadPhotoForFlash.aspx”);
myXMLURL.method = URLRequestMethod.POST
var myLoader:URLLoader = new URLLoader(myXMLURL);

myLoader.addEventListener(Event.COMPLETE, xmlLoaded);
myLoader.addEventListener(IOErrorEvent.IO_ERROR, onXmlIOerror);

function xmlLoaded(evt:Event):void{
trace(“LOADED”);
}

function onXmlIOerror(event:IOErrorEvent):void{
trace(“not loaded”);
}
[/AS]

No joy…?

Now as far as I know, error #2032 is an incorrect url error, and these urls check out fine in the browser.

Anyone got any suggestions?