peter5
12-04-2005, 12:04 AM
Hi, I am creating "who wants to be a millionaire" style game for use in a highschool classroom. I have played around a little with writing text from flash to a textfile, but it has been over 12months since I wrote a php script that accessed a database.
I am firstly just wanting some advice about the best method (so I don't waste my time when I could be doing it much more simply). I am also not sure of the full capabilities of Actionscript (ie compare to full-blown languages such as C++ and VB).
My thoughts are as follows:
Use a mySQL database to store the quiz questions. (each quiz question is actually a row consisting of the following fields: level of difficulty (num), question, Answers A, B, C,D, Audience stats, phone friend comments)
When the flash program loads, it will want an initial question based on the current level of difficulty.
Flash will call a php script (can flash pass the level of difficulty as a variable, or will I need individual php scripts with a built-in levels of difficulty?)
The script will return a random row from the database based on the level of difficulty (consisting of all the fields in that row).
Will the php script be able to return 9 strings, or will it only a single string. In which case will I have to parse the string using actionscript?
Will php script be able to generate a random database row?
finally:
Is the best method to use?
Regards,
Cassie.
I am firstly just wanting some advice about the best method (so I don't waste my time when I could be doing it much more simply). I am also not sure of the full capabilities of Actionscript (ie compare to full-blown languages such as C++ and VB).
My thoughts are as follows:
Use a mySQL database to store the quiz questions. (each quiz question is actually a row consisting of the following fields: level of difficulty (num), question, Answers A, B, C,D, Audience stats, phone friend comments)
When the flash program loads, it will want an initial question based on the current level of difficulty.
Flash will call a php script (can flash pass the level of difficulty as a variable, or will I need individual php scripts with a built-in levels of difficulty?)
The script will return a random row from the database based on the level of difficulty (consisting of all the fields in that row).
Will the php script be able to return 9 strings, or will it only a single string. In which case will I have to parse the string using actionscript?
Will php script be able to generate a random database row?
finally:
Is the best method to use?
Regards,
Cassie.