We help IT Professionals succeed at work.

Getting Flash to read information from MySql

Expressions asked
Medium Priority
Last Modified: 2010-04-03
I currently use Flash MX 2004 and wondered if anyone could point me in the right direction of a good resource for Getting Flash to take information from a MySql Database.

Basically I am creating a game that consists of rooms.  I could fairly easily create each individual rooms in flash with all the various objects/monsters/etc in the room, but I would prefer for to be able to store all the information about the rooms in a database, so when a person enters the room, it loads up this information.  Is this possible? and how difficult is it?

Thanks in advance.

Watch Question

This is possible but would be somewhat difficult. My suggestion is to have Flash call a PHP page that would read from the mysql server the data and then return it to flash in xml format. This is better because the data is neatly formatted in xml making it easy for flash to parse. Now the only concern would probably be how to store the data as well as how the xml format should be. After that comes the grunt work of creating the PHP page and then the getting flash to do the right thing after getting the xml data.


Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
I recommend you to take a look at this web-site: http://www.amfphp.org/
AMFPHP is open-source engine that makes it hell easier to communicate with mysql database, becase you don't have to wrap all the query results into xml to have it unwrap right after it reaches your flash application. This engine enables you directly recieve results from db and even use it as input to flash data-aware components...  Samples and tutorials included... easy to use. Take a look.

( Answer to your question: yes it's possible to do that... and with amfphp, communication with db will not be flash specific task.. so it's enough if you have some experience with mysql db. Processing recieved data in flash , that's another thing... :o)


Ill have a look and tell you how I get on.


Opps I thought I had answered this.


I will split the points but give more to ivan_os as his gave more information.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.