I've got a SWF, embedded in an object, just like the standard Flex HTML. In 
another section of the same HTML, I have JavaScript that calls a function in 
the SWF. However, when the call is made, everything stops. That is to say, all 
code written after that call is ignored, and the function itself doesn't 
execute.

// In the HTML
function JavaCall()
{
   getFlexApp('SWFName').callFlexFunc();
}

function getFlexApp(appName) 
{
   if (navigator.appName.indexOf ("Microsoft") !=-1)  return window[appName];
   else return document[appName]; 
}


// inside app creation function
ExternalInterface.addCallback("callFlexFunc", calledFunc);

// outside creation function
public function calledFunc(event:Event = null):void
{
   // Execution doesn't get this far
}

I should note that the object and embed that hold the SWF are set to 
allowScriptAccess="always". It's not something I intend to ship with, but I'm 
grasping at straws at this point.

Every tutorial I've seen on the subject seems to indicate that I'm doing just 
what I should be doing. So I have no idea what could be wrong. Any help would 
be appreciated.

-Brand

Reply via email to