Introduction: Using Actionscript 3.0 /PHP / MySQL / and XML to create data tables within Flash

Adding a high score table to your game is a function that can greatly enhance your flash games. This tutorial will guide you on how to make a table of top scores (high scores) within Adobe Flash CS3 using the DataGrid component, as shown below. When I first attempted to create a high score table in my flash application, I had no idea where to start and couldn’t find a good tutorial to get me going. Thus, I decided to write this tutorial to help others interested in creating high score tables or just plain old data tables within flash. This tutorial will help you understand how Actionscript 3.0, PHP, MySQL, and XML interact with each other to process data.

Table of High Scores


In order to make a table of top scores, we need some place to store these top scores. There are a couple of ways to store this data (i.e. text file on your web host), but this tutorial focuses on using MySQL to do that. The data tables that will be used are not limited to just displaying high scores, but can be used to display any type of data. I assume that if you are interested in making a high scores table, that you are somewhat knowledgeable with Adobe Flash CS3/PHP/MySQL/XML and proficient in programming with Actionscript 3.0. But even if you don’t have the background, you can still learn a lot by going through this tutorial since I have provided a lot of the code (commented too!).

Below is a game I developed in flash that utilizes the high scores table. Give it a try!

This text is replaced by the Flash movie.

Now that you’ve seen the high scores table in action, we’re ready to get started! Also, you can download the source code here if you’re interested

Pages: 1 2 3 4 5