Flash memory match game

I wanted to know if anyone can lend me a helping hand on this matching game. I’ve tried a few scenarios to get the cards to flip back and reset but the script continues to run through all of the cards.

I also got the matches to close when the pairs are selected.
The problem only happens with cards that do not match.

Aonther problem I have is when you press the same card twice. my variable previousVal does not reset to zero.

basically I want this to happen when you click on a non match.

if you press cardOneA
and then press cardTwoB

cardOneA flips and cardTwoB flips and goes back to it’s reset state. i have a in animation and out animation made in “cardOneA” etc. cardOneB and cardTwoA do nothing and remain static. If you press the pairs they obviously disappear and if all four cards are removed the game concludes on the “finish” frame.

you can download the source here: match.zip

Thanks for the help :slight_smile: