title: In Actionscript 3, how do I create movieclips through a looping statement?
body: <p>The statement <code>for</code> takes a triple as an argument</p>
  
  <p>(initial value of <code>i</code>, condition to cease looping, <code>i</code> increment)</p>
  
  <p>I want to create a different movie clip each time the loop goes on.</p>
  
  <p>So, I tried:</p>
  
  <pre><code>for (i = 0; i &lt; 9; i++){
      var Unit+i:MovieClip = new MovieClip()
  }
  </code></pre>
  
  <p>But, this triggers the following error:</p>
  
  <blockquote>
    <p>1086: Syntax error: expecting semicolon before plus"</p>
  </blockquote>
  
  <p>What's the correct syntax, then?</p>