Saving and Loading in Actionscript 3 (Mini-Lesson)

One thing you want to do as a game developer is make your players want to come back to your game more than once. And one of the best ways to accomplish this is to enable them to save their data for persistent gameplay. You might expect saving and loading to be tough to implement, but actionscript 3 is helpful enough to include the powerful SharedObject, which makes saving and loading data a piece of cake.

In this tutorial, we will create the following demo. Click the “+1” button a few times to add to your score. If you refresh this webpage without clicking the “save” button, your score will revert to 0 when the page loads. But if you do click the “save” button, your score will load automatically the next time you load the page. Try it out!

Continue reading to learn how to save and load data in actionscript 3


AS3 Health Bar Tutorial (Mini-Lesson)

I’ve received a request to teach how to make a health bar in actionscript 3. Health bars can be found in all sorts of games, so I decided not to confine it to a single tutorial series. Instead, I’ve made this the first of a new section of Mini-Lessons on this site, to cover miscellaneous small game mechanics which can be used in a variety of games.

This tutorial is heavily image-based :-)

Here’s the demo of what we are going to create in this tutorial.

Easy to make. Easy to customize.

Pretty cool, huh?

Continue reading