Hello! I’ve been working with Flash MX and MX 2004 to connect to my database. I have an Access database that I use with my ASP pages to login, save user profiles, and other user data. That works fine and I’ve been able to create static Flash dynamically generated from the database data.
I want to make a game online, and I wonder if this is the easiest way (see below)
1.) Flash file is 800x600 and loads in a browser window.
2.) Flash file in your browser communicates with Datain.asp and Dataout.flx on my webserver (http://myserver.com/datain.asp)
3.) Datain.asp and Dataout.flx work like this:
4.) Flash file says “User just clicked ‘F’ key” and sends the message to Datain.asp
5.) Datain.asp takes the data and saves it to the Access database for the game that matches (since there are probably a couple games at one time)
6.) Flash file in your browser is checking http://myserver.com/dataout.flx for more variables with a more recent timestamp. There is none.
7.) Datain.asp, checks the new database and uses formulas using the most recent timestamp and saves the variables to a Flash friendly text format, I call dataout.flx (with @ symbols like Flash understands, syntax, etc.)
8.) Flash file in your browser checks http://myserver.com/dataout.flx and finds updated variables. Your client is programmed to update according to the new variable data and your screen is updated.
If the server could do this in under 100ms we could play multiplayer action games in Flash! Maybe there’s an easier way?
W-I-P website is at http://ben.guruexp.info if you want to check it out (testing it later this week).