![]() |
Blog | MXML Example | Actionscript Example | Example App | FAQ UPDATE, July 15 2007: Now on Google Code In Sept. 06 I set out to show someone that is was possible to connect to a mySQL server from acionscript. It took about an hour to get actionscript connecting to mySQL. I was getting a bad handshake error but if anything I proved that it could be done. That project then sat in Flex Builder until about a month ago when I started back on it. And now, a mySQL actionscript 3 driver exists. This project is very much still in Alpha stages but neverless it is working. Writing a database driver in actionscript raises some major concerns. One of the biggest concerns to address is fact that to use an actionscript database driver you will need to make your database server publicly accessible. Another issue is where to store the server location, username's, password's etc. For passwords, I just assumed that most people would not want to store the password in the swf itself. So when connecting to the database you provide a "Scrambler" class that handles receiving the seed from mysql, sending it somewhere, encrypting the seed using the database password, then sending the scramble back to the connection to be used in the authentication process. Currently the only scrambler I am providing is the "PlainTextScrambler" which will allows you to just provide a string for the password. This scrambler will work for embedding passwords in the swf and allowing the users to input a password. When developing this I have been testing on a locally installed MySQL 5 database. I have been developing it to support 4.1.1 and later MySQL releases but I have not done any testing on 4.1.1. If you come across any bugs please post them in the forum. Here are some quick examples of using the driver. MXML:<mx:Script>
Straight Actionscript:private function getUserList():void
Example AppI am still working with my ISP to come to a solution to get a crossdomain.xml file put on the database servers. I will post an example application as soon as things are worked out.
Known Issues- Sometimes you will receive a 'Bad Handshake' error when connecting with correct credentials. Not sure why this is happening but it is something I need to look into. - SQLErrorEvents sometimes are not caught by the MysqlService class.
FAQDoes it work in Apollo? You Bet!
Discussion
Documentation
DownloadsLatest Release on Google Code: http://code.google.com/p/assql/
Source Code |
|
|