FORUMS: list search recent posts

[AS2] XML sendAndLoad

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Sam Mattern
[AS2] XML sendAndLoad
on Oct 16, 2008 at 2:24:11 pm

I am using an XML file to hold login credentials for a site. I added an administrative section to the flash file so that I can see the current users, and add or remove users without manually editting the XML file. I can add and remove users just fine, but the list of current users displayed in the admin screen does not update.

I'm using a sendAndLoad call like this:

tripts.sendAndLoad( "tripts.php", newXML );

Then I have a function:

newXML.onLoad = function( success ){
userCreds.text = "Loading...";
}else userCreds.text = "Error...";

It works fine locally, but when I run it from the server, the onLoad never fires. Could it be something permissions related? I mean, I can execute the PHP and write to the XML just fine, so why wouldn't it pull the info back into Flash?

Oh, here's the PHP:
$filename = "tripts.xml";
$raw_xml = file_get_contents("php://input");
Print $raw_xml;
$fp = fopen($filename, "w");
fwrite($fp, $raw_xml);

Any help is appreciated. Thanks in advance!


Return to posts index

Sam Mattern
Re: [AS2] XML sendAndLoad
on Oct 20, 2008 at 4:35:09 pm

So, after a week of messing around, I never got sendAndLoad working correctly. Tired and badly beaten, I created a workaround.

I still use the sendAndLoad to send the updated XML to the PHP. After sending, I set a "reset" variable to true and use an Interval to call my original load function (at the login screen) after one second. After reloading the updated XML, it knows to go back to the administration screen (checks to see if the reset variable is true).

Anyways, not the way I WANT it to work. I've tried everything with file permissions on the server. Others have had great success with sendAndLoad and PHP, so who knows what the problem is. At least it's working.

Hope that helps,

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved