I want to let my users create leaderboards (high scores) when they make a post(a flash game in this case), there shouldn't be a limit on the number of tables created, also they need to be able to mark them as public or private (only the user that creates them can see them) and the sort order (high scores or low scores).
There needs to be a way to show all public leaderboards for a game.
I also need a way to insert data into the highscores, I will create the flash API according to your method.
Next the users should be able to post challenges (Ie: score over 9000 in game X), again this should be marked as public (everybody can accept the challenge) or private (only a certain user can participate).
After a score is submitted, the script should check if the user succeeded or failed.
There should be a way to show all currently open challenges, and challenges for a specific game.
I will create the flash API the way you want to check this.
Both the way to send highscores and the way to check challenges must be secure. Also it must check if the users are logged in before submitting, and if they are not prompt them to do it without losing the score.