title: AS 2 - Pulling info from multiple arrays in a loop for buttons
body: <p>I have 3 arrays.</p>
  
  <p><strong>- Array 1</strong> Button names</p>
  
  <p><strong>- Array 2</strong> x positions</p>
  
  <p><strong>- Array 3</strong> y positions</p>
  
  <p>I have all of the movieclips on the stage w/button names and a movieclip named test. I'm trying to make each mc button move the "test" movieclip to a specific location.</p>
  
  <p>I'm able to loop through the buttons but unable to get the current number of the button in the array to use for the x and y coordinates.</p>
  
  <p>Any help is greatly appreciated!</p>
  
  <pre><code>            var hrN:Array = new Array(bHRSD,bMASP,bGLD,bGRBDS,bWIe,bGC,bGHCM,bMCRGB,bCE);
              var hrNX:Array = new Array(10,20,30,40,50,60,70,80,90);
              var hrNY:Array = new Array (10,20,30,40,50,60,70,80,90);
  
  
  
              for(var i=0; i&lt;hrN.length; i++) {
                  hrN[i].button = i;
                  hrN[i].onRelease = function()   {
                      test._x = hrNX[trying to get the current number of the hrN array here];
                  }
              }
  </code></pre>