I was developing another little game, and I've been fighting with it for a couple of days, and after trying to locate the problem, seems like in the end it is just a limitation of the myXML.load() function.
A bit of detail about it:
I'm trying to send the scores to my .php at the same time I'm getting the updated list of scores in a XML format, something like:
myXML.load( "scores.php?action=submit_score &name=mr.doob &score=1000 &code=893493" );So, the php will update the highscores table, and then It will give back the updated table in a XML format. However seems like this doesn't work. For some reason Flash doesn't ever do the call. I've debugged a lot this and this is what I've found:
myXML.load( "scores.php?action=submit_score" );Works properly, Flash does the call, and it gets the XML back.
myXML.load( "scores.php?action=submit_score &name=mr.doob" );Works properly, Flash does the call, and it gets the XML back.
myXML.load( "scores.php?action=submit_score &name=mr.doob &score=1000" );Doesn't work!!
Seems like
if you send more than 2 GET variables then flash won't do the call, and I know that it won't do the call because I've a logger on my php code that is saving all the calls that is getting on a .txt file.
Does anyone know if there is any workaround? I'll use a loadvars to send the scores and then get the XML again with a simple call.
#permalink
Share:Digg! ~
del.icio.us ~
Stumble ~
Furl ~
Reddit
Anyway, you could use the ouput of a loadvars request to parse it as a XML... would be something like this:
php ouput:
&estado=ok&xml=
flash:
miLV.onLoad = function() {
var xml= new XML();
xml.parseXML(miLV.xml);
}