Hi… I’ve been doing lots of work with AS3 and am finally developing a good sense of how it works. But I have encountered a mysterious problem with the URLLoader class, and I was hoping someone could provide an insight.
I use this class all the time for sending/receiving data from php files (in conjunction with URLVariables and URLRequest), and it usually works great. However, I have noticed that it doesn’t seem to work when I just want to execute a script without passing any variables or receiving data.
For instance, in AS2 I could do the following to execute a file:
demoOut = new LoadVars(); demoOut.load("test.php");
so with AS3 I should be able to do
var urlLoader = new URLLoader(); var request = new URLRequest("test.php"); urlLoader.load(request);
but this does not work - the code in test.php does not execute (in this case it needs to write some XML). the file works fine when called by url in my browser, so there is nothing wrong with the PHP
I have even added an Event.COMPLETE listener and it fires just fine so it is loading the page alright… but why doesn’t the code execute? This baffles me…
thanks for you help