Subject:
Calling flash function from javascript using the swfobject doesn't seem to work (though allowscriptaccess param set to always).

Description:
A setCagegory method was added to the flash file. This function should be called from the javascript code (in callExternalInterface() function).
Unfortunately this doesn't seem to work.
Below are the relvant code extracts.
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <title>flash experiment    </title>
      <script type="text/javascript" src="http://localhost/moov/js/swfobject.js"></script>        
      <script type="text/javascript">  
            
              var flashvars = {};
              var params = {
                allowscriptaccess : "always"
              };
              var attributes = {};    
         
            swfobject.embedSWF("http://localhost/moov/app_files/moovFlash.swf", "movieFlash", "914", "426", "9.0.0", false, flashvars, params, attributes);
        
        
            function callExternalInterface() 
            {
                alert('in callExternalInterface');          
              thisMovie("moovFlash").set_category(1);
            }
            
            function thisMovie(movieName) 
            {
                if (navigator.appName.indexOf("Microsoft") != -1) 
                {
                    return window[movieName]
                }
                else 
                {
                    return document[movieName]
                }
            }    
                            
          </script>  
  </head>  
  <body onLoad="callExternalInterface()" >       
    <div id="movieFlash">
            <h1>Moo-V-GROUP</h1>    
    </div>  
  </body>
</html>
flash action script code :

Code:
import flash.external.*;

var currentCategory = 1;

var instance:Object = null;
var wasSuccessfulPlay:Boolean = ExternalInterface.addCallback("set_category",instance, set_category);
function set_category(category_id:String):Void
{
    currentCategory = category_id;
}