Local high score table

28 Dec

I mentioned in a previous post that I wanted to make a highscore table that saves locally.

There are plenty of reading materials online about how to make a highscore table that saves online through PHP. I can’t do this as the riverfront (the place where Spaced Out will be exhibited next year) wont have wifi, so a local one is the answer.

Surprisingly, I could only find out how to save vague info from flash to a local drive, so I took it upon myself to make my own solution.

It uses arrays and array sorting to handle the bulk of it, so I went and read up on some array info.

Turned out to be fairly straight forward.

A fairly simple example. I didnt make anything look great, or try to add lots of features, this is just a simple, no nonsense highscore table that saves data locally.

And, if anyone wants the code, they can have it.

Here is the source code plus the .fla files in cs4 and cs5 versions.

highScoreTable

*update*

oops, noticed that the line sortOn([“score”, Array.NUMERIC]); should be

sortOn(“score”, Array.NUMERIC); wont work otherwise. sorry!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: