I want to create a program to write a开发者_Go百科nd access a database. How do I do that using ActionScript?
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.
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.
精彩评论