title: Tips on using Mootools Swiff object to talk between JS and Flash Movie?
body: <p>I'm trying to use Mootool's Swiff object to load a flash movie and to start talking with it. I've been following the example here:</p>
  
  <p><a href="http://mootools.net/blog/2008/02/12/whats-new-in-12-swiff/#more-63" rel="nofollow noreferrer">http://mootools.net/blog/2008/02/12/whats-new-in-12-swiff/#more-63</a></p>
  
  <p>Which I know is a little out of date (the events option should be callBacks apparently) but should at least be a start. Yet I can't get the thing working one bit. No JS errors, firebug says its loaded SWF from my server at least but no alerts! Whats missing?</p>
  
  <p>Actionscript:</p>
  
  <pre><code>//(ActionScript)
  import flash.external.*;
  
  function echoText(text) {
      ExternalInterface.call('alert', "This message is from Flash: "+text);   
  }
  
  ExternalInterface.addCallback( "echoText", this, echoText );
  
  //Fires the 'onLoad' event within the Swiff object.
  ExternalInterface.call(_root.onLoad);
  </code></pre>
  
  <p>My JS:</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Terris test console&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;script type="text/javascript" src="mootools.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript"&gt;
  
              var obj;
  
              window.addEvent( "domready", function() {
                  //(JavaScript)
                  obj = new Swiff('interface.swf', {
                      width:  1,
                      height: 1,
                      container: $('swiffContainer'),
                      callBacks: {
                          onLoad: function() {
                              alert("Flash is loaded!")
                          }
                      }
                  });
              });
  
  
          &lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I'm using Mootools 1.2.2 from here <a href="http://mootools.net/download" rel="nofollow noreferrer">http://mootools.net/download</a></p>
  
  <p>Any ideas?</p>