3 Replies Latest reply on Jan 13, 2010 6:35 AM by kglad

    Automatically duplicating the actionscripts

    Devoteé

      How can I duplicate (repeat) an actionscript?

       

      Eg. I've got a color palette with 40 color swatches. I want to add A3 and A4 to each colour button.

       

       

      COLOUR 1

      colorchange = new Color("/gmb_mc/gmb_mc2/A0");
      colorchange.setRGB(0x121D37);
      colorchange = new Color("/gmbb_mc/gmbb_mc2/A1");
      colorchange.setRGB(0x121D37);
      colorchange = new Color("/gma_mc/gma_mc2/A2");
      colorchange.setRGB(0x121D37);

       

      COLOUR 2

      colorchange = new Color("/gmb_mc/gmb_mc2/A0");
      colorchange.setRGB(0x000000);
      colorchange = new Color("/gmbb_mc/gmbb_mc2/A1");
      colorchange.setRGB(0x000000);
      colorchange = new Color("/gma_mc/gma_mc2/A2");
      colorchange.setRGB(0x000000);

       

      // is there a easy way to do this?