RE: Reading XML input from flash

2002-12-11 Thread jevgeni









-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.











Ourflash 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(Weve 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










Re: Reading XML input from flash

2002-12-09 Thread Kee Hinckley
At 1:01 PM -0500 12/9/02, Marc Slagle wrote:

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.

I'd like to shoot whoever designed the Flash object model.  There's a 
different send and load function for each data type.  So you can't 
POST cgi stuff and get back xml.  (You can hack a GET, by hand 
appending the arguments, but that's it.).  The stream communications 
should have been in a separate class, not there for each type of 
parser.

But that doesn't solve your problem.  I've forwarded the question to 
someone who's playing with it.  We're actually just a few days away 
from doing the same thing (right now we are doing a GET and reading 
XML, but we need to switch, and since we can't POST anything except 
XML, we'll have to gen up some type of XML communication).  I'd be 
intrested in your progress.
--

Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.