1
votes

I am developing a quiz software in Adobe Flash cs5.5. So the software could use a database for displaying questions and keeping scores. I am planning to develop it as normal application (Visual Basic like) that can retrieve questions and update scores.

I searched everywhere, but I couldn't. I could see only connecting to server side database using PHP and MYSQL. My application is a stand alone one. I think there is some way to connect a database using ActionScript 3.0. So how can I connect to flash cs5.5 with any kind of database?

2
Calm down.. :), Are you uing adobe air, or just exporting as a projector? If the latter, you're SOL. You could also use projector extension software like MDM Zinc, it bolts on some database features. - BadFeelingAboutThis
Are you connecting to a remote database, or a local database file (like access) - BadFeelingAboutThis

2 Answers

2
votes

I'd recommend you to use XML instead of a SGDB. It seems to be a simple app, anyone can manage a well written XML file.

If you really need to have some content manager upon this data, you could build something integrated with a database and generate the XML based on your database.

2
votes

There are a few ways you can get access to local data (or databases).

  1. Use Adobe AIR. This gives you access to the file system so you can read and write files. It won't let you connect to server database, but you could read/write xml (or any) data, including a database file like sqlite and use an AS3 classes to parse said file. http://www.flex-blog.com/adobe-air-sqlite-example/

    There are also AIR library's like http://code.google.com/p/assql/ for helping with database connections

  2. Use MDM Zinc (or similiar). http://www.multidmedia.com/software/zinc/ Mdm zinc gives you loads of extra API's in AS3, including database support.

  3. Use the FileReference class to let the user browse their computer for a database file (.xml preferably) and then use FileReference again to let the user save that file wherever they'd like.

  4. Use a remote database and create a server side page/service to dish out the data you need and use the normal URLLoader class like you would with any flash file. Seem like you don't want to use this method though.