tags:

views:

24

answers:

1

Hi, I'm using the following code to get something through XML

var myLoader:URLLoader;
var myXML:XML;
var myXMLURL:URLRequest = new URLRequest("http://testapp.varheroes.com/yofacebook/canvas/calcammo/");

myXMLURL.method = URLRequestMethod.POST;
myLoader= new URLLoader(myXMLURL);
myLoader.dataFormat=URLLoaderDataFormat.TEXT;
myLoader.addEventListener(Event.COMPLETE, processXML);


function processXML(e:Event):void {
 myXML = new XML(e.target.data);
 dummyText.text = myXML.AMMO;
}

When I test the code offline it works perfectly fine but when I put it on the webpage

http://media.varheroes.com/flash/as3.swf

It stops working :/

Running it offline gives me this XML, which I can put in a text field

<MAIN><AMMO>54564564564564564545464564564564</AMMO></MAIN>
+1  A: 

Look for cross domain xml if your xml file is out of your application.

CrazyJoe
could you elaborate on that? I tried testing my XMLurl it works http://testapp.varheroes.com/yofacebook/canvas/calcammo/
Fahim Akhter
Read this, should make things clearer: http://kb2.adobe.com/cps/142/tn_14213.html
Badaro
That helped thanks Badaro! :D
Fahim Akhter