# Card game - Selectable cards

**URL:** <https://forum.kirupa.com/t/card-game-selectable-cards/307037>\
**Category:** programming\
**Created:** [March 26, 2010, 2:53pm UTC](https://forum.kirupa.com/t/card-game-selectable-cards/307037 "2010-03-26T14:53:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nim](https://avatars.discourse-cdn.com/v4/letter/n/67e7ee/32.png) [@Nim](https://forum.kirupa.com/u/Nim)\
**Post date:** [March 26, 2010, 2:53pm UTC](https://forum.kirupa.com/t/card-game-selectable-cards/307037/1 "2010-03-26T14:53:34Z")

</div>

hi.

I’m trying to create a card game (as3.0).

I create the deck, and deal all the deck’s cards on stage (movie clips) but I want to be selectable.

So while I’m creating every card I add to them an event listener on MOUSE\_DOWN that calls a function called _selectedCard_. For the moment, I want the _selectedCard_ function to change the x location of the clicked movie clip (card).

How is it possible to tell the function **which specific** movie clip is selected in order to change it’s x location?

I hope I made my self clear.

Thanks in advance
