Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Data Integration / July 2007



Tip: Looking for answers? Try searching our database.

Send and receive data from mysql.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
onelotusguy - 18 Jun 2007 01:28 GMT
I would like flash to send and receive data from mysql.

To send data I would like to create 5 input fields, and then use a submit
button.

Then to retrieve the data I would like to use the data grid or a dynamic text
field.

How would I accomplish this?
MotionMaker - 19 Jun 2007 16:37 GMT
Which one?
Flash 8 AS2
Flash CS3 AS3
onelotusguy - 20 Jun 2007 21:24 GMT
Flash 8 AS2
MotionMaker - 21 Jun 2007 14:17 GMT
In Flash 8 you can use either the XML.sendAndLoad or the LoadVars.sendAndLoad
methods from their respective classes XML and LoadVars. Just your choice on the
PHP side whether you like to deal with XML or URL variables.

The shell examples are excellent with the Flash help. You just need to provide
your own PHP script:


http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?con
text=LiveDocs_Parts&file=00002879.html#wp518030

http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?con
text=LiveDocs_Parts&file=00002336.html#wp292432

Then in either class's onLoad method, you can populate the controls as you
have designed.

There are plenty of examples on the Internet.
I have a few such as

http://www.hosfordusa.com/ClickSystems/courses/flash/examples/XMLPHPMySql/Ex01/X
MLPHPMySQLEx01_Doc.php
onelotusguy - 02 Jul 2007 00:58 GMT
Questions On XMLPHPMySQLEx01_Request.fla.

1. On the DataGrid under the Schema you added code, how can I view what you
did?

  I pulled this line from line 69(output_txt.htmlText += "------" +
xmlData_xml.firstChild.childNodes[0].childNodes[0].nodeName )

2. How does the xmlData_xml.firstChild.childNodes[0] relate to the php?

This how I see it THe firstChild.childNodes is saying look with in the
echo"<user>"
Is this correct?
And the last set of instructions is say(childNodes[0].nodeName) look with in
"echo '<sequence>'"

Am I correct on this?
MotionMaker - 02 Jul 2007 13:26 GMT
You return XM, then Flash parses it into an
http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?con
text=LiveDocs_Parts&file=00002862.html#wp509029 object. Flash XML and
http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?con
text=LiveDocs_Parts&file=00002883.html#wp519615 class to navigate to the node
you want.

Many folks look for a tool to convert the XML in Flash to an object with tree
nodes to make it easier to use.

<datapacket>

<response>'
    <stats querySeconds = "1234">
        <code>1</code>
        <message>Success</message>
</response>
<users>
     <user>
       <sequence>1</sequence>
         <id>12</id>
        <firstname>grizzly</firstname>
        <lastname>bear</lastname>
        <email>grizzly@mountaincaves.com</email>
     </user>
    <user>
       <sequence>2</sequence>
         <id>13</id>
        <firstname>yoggi</firstname>
        <lastname>bear</lastname>
        <email>yoggi@park.com</email>
     </user>
</users>
</datapacket>
onelotusguy - 03 Jul 2007 00:51 GMT
On line 123 were you move the data to the output_txt, Is their a way I can
singal out the individual Data comming in?

example If I wanted to Just the see Id in one text box and the first name in a
second box.

Guy
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.