title: How to dynamically generate variables in Action Script 2.0
body: <p>I have a for loop in action script which I'm trying to use to dynamically create variable.</p>
  
  <p>Example</p>
  
  <pre>
  for( i = 0 ; i &lt 3 ; i++)
  {
      var MyVar+i = i;
  }
  </pre>
  
  <p>after this for loop runs, i would like to have 3 variables named MyVar1, MyVar2, MyVar3.  I know the code above will give you a syntax error, but that is just to illustrate what I am trying to do.  Any takers?</p>
  
  <p>The primary reason i'm doing this is because I'm having scope problems noted here in this other unanswered Action Script question:  <a href="https://stackoverflow.com/questions/1713813/how-to-pass-variables-into-inline-functions-in-action-script-2">How to pass variables into inline functions in Action Script 2</a></p>
  
  <p>Thanks!</p>