Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MySQL + Flash

Status
Not open for further replies.

tkinter

Technical User
Jul 31, 2002
24
0
0
US
Is there any way to have a client-server flash relationship?

Here is what I would like to do:

I have a game server, which I would like to log x/y coords of players on a map, and have flash, on a webpage, query the server for these x/y coords of players, and also pass along info such as health, name, and a few other things. This wouldn't be much information to send across the internet, (less than 1k)

Can Flash run and query a mysql database?...and can you make it query any mysql you want? (Perhaps if game host was different than web host?)
 
btw, I just want to query mysql, not write, and I dont constantly want page refreshes, etc or constant lookups from a php...or do I have to load vars from a php? (load php in flash, input vars into functions?)
 
That can be done using something like PHP to interface with MySQL. But look into using the xml socket connection. That would probably be a better way of doing it.

With the MySQL method, you are constantly having to connect to and query the database. With xmlsocket, you maintain a steady connection and send small packets of data.


frozenpeas
 
Well, can I open 2 connections to mysql?

I'm writing to mysql every 1 second w/ a server...
And I'm trying to get information every 1 second from each web client.

Can I open 2 connections with mysql and just write and read?...
 
Btw, I'm writing locally. (Same server is writing to its database)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top