title: How to call a function of embedded swf from wrapper flash movie?
body: <p>I created a test.fla containing a rectangle symbol with instance name "mc" and on the first frame some as3 code:</p>
  
  <pre><code>import com.greensock.*;
  function forward() {
      TweenLite.to(mc, 1, {x:132});
  }
  function backward() {
      TweenLite.to(mc, 1, {x:12});
  }
  </code></pre>
  
  <p>This fla is now published as test.swf.</p>
  
  <p>Then I created a <strong>wrapper_fla</strong>, created new symbol and inside this symbol imported test.swf. Named the symbol instance "swf".</p>
  
  <p>Then added two buttons: btnForward and btnBackward to wrapper_fla (outside the symbol) and this code to 1st frame of wrapper_fla:</p>
  
  <pre><code>btnForward.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandlerForward);
  function mouseDownHandlerForward(event:MouseEvent):void {
      swf.forward();
  }
  btnBackward.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandlerBackward);
  function mouseDownHandlerBackward(event:MouseEvent):void {
      swf.backward();
  }
  </code></pre>
  
  <p>When I test the movie and click on btnForward, there is an error:</p>
  
  <blockquote>
    <p>TypeError: Error #1006: forward is not a function.<br>
        at wrapper_fla::MainTimeline/mouseDownHandlerForward()</p>
  </blockquote>
  
  <p>How to do it correctly?</p>