Making a database talk to Flash.
These are the PHP files:
Note that the linkd are text files. Just download and rename to “.php†file by taking out the “.txt†part.
1. dataMonkey_xml5.php
2. dbInfo.php
The name of my table is “infoTable†which you will need to change to the name of your table in the XML section of the PHP (file 1). The XML section is the part below the ###### followed by # XML.
# signs in PHP is the comment command.
this is what my database looks like:
this is what the PHP file produces if you see it trough a browser window:
and this is what the source of the window looks like (XML gooness!):
this is a good video tutorial I found online:
http://library.creativecow.net/articles/brimelow_lee/php_mysql/video-tutorial.php
Once you have your PHP/MySQL set up, which is XML in disguise, you will need the Flash.
The flash for now is just a file that imports the XML and is nothing fancy. I got this working with the help of a file that I made during a flash class at SVA. The originator of the file is Joshua Davis.
this is the Actionscript which you should add to the first frame of a new AS2 file. Paste this code in the first frame:
code is here
when you publish the file it should look like this:
Please excuse the smiley face since it is not needed.
so there you go! now you can use the variables for anything!
Last but not least, the actual flash file!
http://blubee.com/itp/flash_db/xml_lesson_07ot.fla.zip