Connecting Flash to a Database by David Hickenbotham
Flash is pretty dang slick, even when the UI is designed poorly. The only trouble with it is that it’s tough to keep the file to a small size if you have to stick it full of tons and tons of data to display.
Most of you are saying, “There are ways of connecting it to a database.”
There are, in fact, many ways to connect Flash to a database on a server. Most of them are pretty clunky, working by passing XML back and forth via scripts on the server side. They work, and well enough until something better comes along.
Something better is almost here.
A new way of hooking the best client-side UI to a database is about to come out in its full version, using one of my favorite web languages as one of the most important pieces.
AMFPHP uses something called Flash Remoting to call PHP functions through a SOAP interface — receiving data from a database and/or writing data back to a database. (The Flash Remoting functionality doesn’t come packaged with Flash MX 2004, but it is freely available from their website. It actually has been available for some time, though they ability to actually use it has been extremely lacking.)
AMFPHP works with both PHP 4 and PHP5 (although most of their examples are done in the old PHP4 syntax). With PHP5, it takes advantage of the quick new SOAP interface which comes built into the language. With PHP4, you have other alternatives (such as the SOAP that comes with PEAR).
Currently the information on how to use it is lacking, but they do provide links to other sites with good tutorials. They are currently working furiously to improve the documentation, bug fix the software, and revamp their site in preparation for the version 1.0 which is currently in beta and coming out in a full version soon.
Check it out!
This is the bleeding edge of web development.
Related Posts
- SEO Friendly Flash Design
- String Manipulation in Flash
- Learn to Optimize your Databases by David Hickenbotham
Ecommerce Development




