I want to create a program to write and access a database. How do I do that using ActionScript?
A:
ActionScript within the Flash Player has no possibility to access the file system alone. You'll need a server-side language, such as php, to perform such tasks. ActionScript will then only communicate to those scripts and send and receive the information. It so works similar to a simple HTML website, just with Flash displaying the content.
poke
2009-12-05 15:14:31
Not necessarily true. Flash cookies can be up to 100K. Depends on what they want to store. And, well, I'm nitpicking, but the OP doesn't specify that they are in a browser environment (they didn't really specify anything).
mmc
2009-12-05 15:19:58
That's why I wrote "AS in the Flash Player" ;) Of course, AIR has access to the file system and has even SQLite support, but it didn't sound as if this was about AIR here.And yes, Flash cookies works, but it's not very likely that it will be enough when mentioning a database ;)
poke
2009-12-05 15:25:29
A:
Flash(AS3) can make arbitrary TCP socket connections, so this is possible. It presents an immense security risk as a swf can easily be decompiled and a malicious individual can then use the credentials compiled in the swf to perform whatever queries they would like. You also get into socket policy files on the server.
Joel Hooks
2009-12-06 04:19:21