Arrange layers with AS3

Hey Guys!

I have a problem with my portfolio. The problem is this (simplefied): I have two cards (rectangles) next to each other. They are in different layers. When you click on one of the cards, they enlarge, covering the other card. The problem is, card A enlarges correct, because when enlarged, you don’t see the other card. However, when card B enlarges, you still see card A, because the layer of card A is on top of the layer card B. How can i make this card B cover card A? (with card A covering card B when enlarged)

I hope there is a good solution! Thanks!

Marcel