title: Javascript -> Flash throwing "Error calling method on NPObject"
body: <p>I'm trying to call a Flash (AS3) function from Javascript.  When the code runs, I get the error "Error: uncaught exception: Error calling method on NPObject!"  From my day's worth of googling around, this seems to be be a security matter, and I've done everything I can find, but the error still comes up.</p>
  
  <p>Some details:<br>
  * This happens with both Flash 9 and Flash 10 players.<br>
  * The swf is in the same domain as the php file that loads it and that contains the javascript that's trying to call the Flash function.<br>
  * I'm using sfwobject2.2 to load the swf file, like so:<br><br>
  <code>
      var flashvars = {};<br>
      var params = {};<br>
      var params = {menu: false, bgcolor: "#ffffff", allowScriptAccess: "always"};<br>
      swfobject.embedSWF("/path/to/swf", "id", "480", "310", "9.0.0", null, flashvars, params, attributes);
  </code><br><br>
  My Flash movie is doing the allowDomain thing, correctly as far as I can tell:<br><br>
  <code>
  Security.allowDomain("www.mydomain.com");
  </code><br><br>
  * I know that the ExternalInterface.addCallback is set up properly -- when I disable it, I get a "no such function" error instead of the NPObject complaint.<BR><BR>
  This is driving me completely crazy, and I just can't figure out how to correct it.  Any advice out there?</p>