1 Reply Latest reply on Mar 22, 2009 4:34 PM by Ned Murphy

    newbie needs help

      hi everyone. im new to this forum and flash so if im doing anything wrong, please let me know. heres my question:

      im trying to create a card game in flash. i have an array with all the cards. i then randomize the array and start pulling cards. each card was an imported image changed to a movieclip. i use this to load the cards:


      where "holder1" is a movie clip symbol. so, i do this for all cards being deal on the table (holder1, holder2...holder4).

      everything seems to be working just fine. when the user clicks on the card i want to get the name of the movie clip symbol embedded in the "holder" (ie, get the name of the card that was clicked). how do i do this? oh, and im using actionscipt 2
        • 1. newbie needs help
          Ned Murphy Adobe Community Professional & MVP
          Probably the easiest way to deal with it would be to assign a card variable to the holder and use that:

          holder1.card = "card1a";

          Then, if you need to process the card itself, you could target it such as the following examples...

          holder1[holder1.card]._visible = false;


          holder1.getInstanceAtDepth(1)._visible = false;