title: Flash AS3 ExternalInterface call to function inside jQuery document ready
body: <p>From a button in Flash I just want to call a function written in jQuery.<br />When I place the function outside jQuery's $(document).ready it works fine:<br />
  *btw I use SWFObject to embed Flash.</p>
  
  <p>AS3:</p>
  
  <pre><code>import flash.external.ExternalInterface;
  function test_fnc(event:Event):void {
      ExternalInterface.call("jsFunction", "hello world");
  }
  test_mc.addEventListener("click", test_fnc);
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;     
      function jsFunction(words) {
          alert(words); // "hello world";
      }
      $(document).ready(function() {
          // not from here
      });
  &lt;/script&gt;
  </code></pre>