Need help with checkboxes!

I’m making a game for a client in flash - a box opens for ten seconds then closes again. the player now has to mark what he saw inside using the chckboxes next to a list of objects

there are 12 objects in the box and 18 objects in the list to choose from.
I need to check

  1. which objects have been marked
  2. if 8 out of 12 are correct
  3. if at least eight are marked (or else error: “please mark eight objects”)
  4. if a wrong one has been marked

the checkbockes are named cb01, cb02… cb18 and I was checking for marks like this:

if(cb01.selected == true) {
marks = (marks+1);
}

if(cb02.selected == true) {
wrong = (wrong+1);
}

I know theres a way to check them all at once, but I can’t figure that out…

can anyone give me a simple example on how to solve this or recomend a tutorial?

thanx!