title: AS3, create more same function in for loop mehod
body: <p>I try to make some function in for loop method, but it says "Symbol 'myInstanceMovieClip', Layer 'as', Frame 31, Line 29    1084: Syntax error: expecting leftparen before leftbracket."
  Here my code:</p>
  
  <pre><code>for(var i:int=0; i &lt; btnhairmc.length; i++){
     btnhairmc[i].buttonMode=true;
     btnhairmc[i].addEventListener(MouseEvent.CLICK, goPlay[i]);
     function goPlay[i](m:MouseEvent):void{
        trace("btnhair[i]_mc &lt;= clicked");
     }
  }
  </code></pre>
  
  <p>Where's my fault?</p>