1 Reply Latest reply on Nov 3, 2011 8:05 AM by Tony Heagren

    Targeting MCs

    Tony Heagren Level 1

      Hi all,

       

      Making a small and simple game.

      I have and MC on the main timeline (invMC) and within it 12 others (slot1MC, slot2MC, slot3MC etc).

      I have a dynamic text field "slotnum" which increments if a user clicks any button.

       

      I'm using this code to attach MCs from the library:

      - - - -

      on (release) {

              _root.invMC.box.attachMovie("net2MC", newname1, 1);

      }

      - - - -

       

      This works fine.

      But...  I want to attach the clips from the library to the next available (empty) clip in the inventory - so I used this:

      - - - -

      on (release) {

          clipname="newname"+slotnum;

          box="slot"+slotnum+"MC";

           _root.invMC.box.attachMovie("net2MC", clipname, 1);

      slotnum=++slotnum;

      }

      - - - -

       

      No joy.

      Anyideas ?

       

      Best wishes

      Tony