-----Original Message-----
From: Marc Slagle [mailto:[EMAIL PROTECTED]]
Sent
:
Monday, December 09, 2002 8:02 PM
To: [EMAIL PROTECTED]
Subject: Reading XML input from flash

 

Has anyone had any luck reading in the XML sent by the flash XML.sendandload function?  I've looked on Macromedias site, and all over the web, but cant seem to get it to work.  I know that the flash code is supposed to be POSTing the data.

 

Our flash app connects to the server and seems to be trying to send the data, but I cant capture it.

 

If there's any sites or code snippets anyone can provide it would help out a lot.

 

Thanks,

 

Marc Slagle

The Fulkert Consulting Group, Inc.

559 Liberty Hill 2W

Cincinnati, OH 45210

 

You know what, It might be a bug or some too complicated feature, but it does not work :S
But you can use this hack:


XML.prototype.sendAndLoad = function(url,xml_callback){

            this.xml_callback = xml_callback;

            this.onLoad = function (success){

                        if (success){

                                    this.xml_callback.parseXML(this.toString());

                                   this.xml_callback.onLoad();

                        }

            }

            this.load(url+"?xml="+escape(this.toString()));

}

myXML2 = new XML ();

myXML2. (){

            //trace(“We’ve got new XML:”+this.toString());

}

myXML = new XML();

myXML.parseXML("<testxml/>");

myXML.sendAndLoad("script.cgi",myXML2);

 

It redefines sendAndLoad method.
on server side you can receive that xml from $HTTP_GET_VARS[xml].

 

I hope that helps.

 

Jevgeni Ivanov

Reply via email to