7 Replies Latest reply on Sep 28, 2011 8:56 AM by kglad

    Make the selected movieclip active?

    Ron Colmen Level 2

      'tf' is the instance name of the textfield inside a series of movieclips (_root.gm_mc.tfP1.tf, _root.gm_mc.tfP2.tf, .... _root.gm_mc.tfP99.tf).

       

      How do I make the selected movieclip active? and make the following onRelease action work only for the selected?

       

      var mcA:Array = [_root.gm_mc.tfP1.tf, _root.gm_mc.tfP2.tf, .........];

      ip1.onRelease = function(){

      for (var i:Number = 0; i<mcA.length; i++) {

          colorChangeF(mcA[i],0x000000);

      }

      }

      ip2.onRelease = function(){

      for (var i:Number = 0; i<mcA.length; i++) {

          colorChangeF(mcA[i],0xFFFFFF);

      }

      }

       

      function colorChangeF(mc:MovieClip, col:Number):Void {

          mc.c = new Color(mc);

          mc.c.setRGB(col);

      }