This user is yet to take control of their account and provide a biography. If you are the author of this article, please contact us via support AT actionscript DOT org. Please download the PHPObject and try out the sample to better understand what's going on here.
This is just a basic tutorial on how to display data in a mySQL database in flash quickly and easily. You can develop this code further to create dynamic Flash movies that feed off a mySQL database. In this example I'm using an eCard project I'm working on. The code will connect to my database to get the card information (the to, from, and message) and display this data in the flash movie. Also note that you should have dynamic text fields named as each of the variables your want to display in your flash movie
| [as]#include "PHPObject.as" |
So what we're doing is setting up the Gateway to the PHP file first. Then we set up the code in Flash to get the array PHP will return to us and to put each part of the array into seperate input text boxes on in the flash movie. The invoke method starts the process. It calls the php file "cards.php" as specified in the PHPObject function. Now we have to write the PHP to get the database info and return it to flash.
| [as]<? |