xml - Code for communcation between PHP and AS2? -


I have a flash developer with whom I am working. This person is building a device in AS2 which will provide an interface that will send the polling data (first name, last name, email address, vote (categories have 100 items) and some subsets for the user to declare "best"

Everything is justified, Flash Dave will post data for a PHP app that I will develop, and I will store the data in MySQL.

I want to return the data back to the Flash application. I am "invalid email address" or "problem of connecting database" or "vote information acceptable" messages I want to be able to get back JSON or XML data. But I am thinking that there are tools in AS2 to easily consume such reactions.

Some "Hello World" questions I would like to see examples of data which can be JSON or XML data, so I can talk to Flash app and PHP app properly. I understand that AMF is not on the table because it is AS2 but I am open for it Both will work on the ends and given it the obligation of AS2

Below should you give an example

XML:

& lt; Alldots & gt; & Lt; Dotname id = "bigDot" color = "0xff0000" url = "http://www.fletchermartin.com/" photo = "8" /> & Lt; Dotname id = "other dot" color = "0x000066" url = "http://www.ajc.com/" photos = "8" /> & Lt; Dotname id = "thirdDot" color = "0xCC0099" url = "http://www.tiffanybbrown.com/" photo = "0" /> & Lt; / Alldots & gt;

AS2 code

  var point: XML = new XML (); Dots.load ('bigdot.xml'); Dots.Out = Function (Success: Boolean) {if (success) {if (dots.status == 0) {var dotsToXMLString: String = new string (); // a new string variable starts dotsToXMLString = dots.toString (); // Dots Convert XML object to a string and store it in DOTS XML String Var Dots XML: XML = New XML (DotsToXML String); // Creates new XML object with string content from above DotsXML.parseXML (dotsToXMLString); // Var dots nodes: object = dots xml, parsing string from above First Chald; // The first shield (in this case, the outermost element) saves as an object Dots nodesms: object = dots nodes. ChildNode; // The first thing to save the children of hair (i = 0; i  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -