Remembering Selected Boxes - HELP

I need a flash program which can remember all the boxes that have been clicked on.

Imagine i have 5 boxes. They are all white, then I click on and it turns red. I want the program to remember that and store the data in a small file.

Can anyone help??