PDA

View Full Version : spinning wheel help


dcmk7
07-16-2010, 09:36 AM
Hi all, i have plenty of time to complete this but i would just like to know the best way to go about doing it.

It needs to be a small image of a wheel - which would look similar to 'wheel of fortune', where their email address is entered and saved into a database.. user is allowed 3 spins, and the items on the wheel need to be pulled from the database.

Can Flash access MySql databases? Is a flash document able to insert records into a database, there any resources for doing a spinning wheel of this type which might help.

Thanks

ErrorBuster
07-18-2010, 04:15 PM
I am not sure if it can access mySql Databases, but it sure can .txt files and write to them, so you better try to use .txt files to start with.

Here a little example in AS 2.0 :
var nameVars= new LoadVars();
nameVars.onLoad=function(ok) {
if(ok)
{
trace("Loading");
text_var=nameVars.firstname;
}
};
nameVars.load("mytextfile.txt");


the "mytextfile.txt" should look like this:
firstname=harold
lastname=mike

snickelfritz
07-18-2010, 04:29 PM
You might want to research AMFPHP and Zend Framework; both allow fast communication with mySQL database.
IIRC, AS3 is required.