dyadica.net

Fun and Games in the Dyadic Sea

Posts Tagged ‘Tile Based Game’

permalink image comments image
Wednesday, 21 January '09: Flash Shared Objects

Its tutorial time again: With further development of my AS3 Tile Based Game Engine, need has arisen for the inclusion of some simple save game functionality. Constraints set by the overarching project brief have led to the decision to make use of Flash’s Shared Object facilities.

The following is a cut down version of a quick personal future reference article, which can be found here.

So whats a Shared Object

Flash “Shared Objects” provide facility to store and retrieve information on a clients machine similar in method to conventional to cookies. Example use’s for Shared Object data could include a user’s name, progress and high score.

Creating a Shared Object

Before we can use a shared object, we have to create a reference to it within our Flash movie. To do so, just put this line of code in the first frame of your movie:

save_data = SharedObject.getLocal("user_data");

Writing Data to the Object

Writing data to the object s an easy task.  Take a look at the following example to save a users game progress: Read..

Tags: , , , ,

poll tags

css | xhtml | dyadica.net © admin 2010 | powered: wordpress | fuel: ps-wii-elite | top | sign-up