Concentration

Hi guys. I’m trying to produce a flash game similar to the card game ‘Concentration’. Basically, I’ve got some pumpkins that are animated to pop open with a different picture in each one. You have to find a pair to get points.

First, I need to know how to get the pumpkins to randomly put different pictures in each one, and there has to be at least two of each different picture. Somehow I need 2 of each picture to randomly scatter in each pumpkin at the beginning of each level.

I also need help figuring out how to get it to go to the next level once all the pairs have been found.

Thanks in advance you guys!