note: this will only store data 'locally', that is, on the machine that is running the client-side application at the time. in order to use a 'universal' type of highscore system you'll either need to have your own host, a DB, and use a little php, asp or another server side language - or hook up with any of the many service out there that provide this type of API - like mochi, nonoba, etc. BUT you'll also need to learn and understand their APIs in order to be able to implement it within your games.
the best way is to use an API. If you want to make your own host you're a genius The easiest way is to download it as a flash extension. Kongregate one is cool because (in as3) you can also implement a chat, and mochi's one rocks because it have ads $$$ Btw someone here knows how to get the armorgames scoreboard?
i would venture a guess, that the HS system here at AG is implemented only in games that they mount, or are accepted submissions, and i'm fairly certain it is not a publicly open system - once accepted, a sponsor will usually work with a dev to implement a HS API if it fits the game.