I'm hoping someone can give me a link to a decent tutorial for the following:

I'm creating a game where the user will be able to program a character (to jump, move, shoot, etc.) based on a screen with drag and drop tiles. So, on one screen, the user will drag a tile to one square that will have an if/then statement attached to it and depending on the answer in the game, the code will call up the action of another tile. It's sort of like an old game for the PSX called Carnage Heart where you program the brain of the character and then sit back and watch to see if your program runs well enough to keep your character alive.

Being only intermediate at AS, I need a tutorial that will tell me how to have the vars attached to the tiles, carry over to the playing field. Whether I can have the user's tile choices write to an external .txt file or some other method, it doesn't matter.

I hope I was clear in my request. Thanks very much.