I need to have a collection (I think) in my class and I needed some examples or other sites that could help.

I really need to be able to do stuff like:

myClass.layer("red").visible = true
myClass.layer("blue").visible = false

where layer is my collection in my class, red and blue are string keys, visible is a property of the structure, etc. I also need to be able to get/set and add/remove the items.

anyone have any good sites or examples to help?

thanks,