23 Replies Latest reply on Apr 19, 2010 3:48 PM by kglad

    Multiple variables as one

    Ron Colmen Level 2

      I need to make var1, var2.... var10 appear in a single line. How to write the code? The purpose is to reduce the number of lines in my script. If this way is wrong please show how to achieve it in anyother way.

       

      var var1 = "/gmb_mc/gmb_mc2/A0";
      var var2 = "/gmbb_mc/gmbb_mc2/A1";
      var var3 = "/gma_mc/gma_mc2/A2";
      var var4 = "/gmab_mc/gmab_mc2/A3";
      var var10 = "/gmc_mc/gmc_mc2/A4";

      my_btn.onRelease = function () {
      colorchange = new Color(var1, var2, var3, var4, var5);
      colorchange.setRGB(0xCDFF00);
        {   _root.CN1.text= _root.CN11.text="the name"}
      }