I am having an issue with IE when using ExternalInterface and addCallback method -
i use extjs for portlets and the flex app is inside the portlet window. all communication with the flex app is fine till I move/maximize the portlet in which i have the chart(swf).
Once i move/maximize, I can no longer invoke the callback method from javascript. it seems to be loosing the connection with the flex application.
it is the same if i use fabridge.js
I get a javascript error - “unknown exception”/“unspecified error”, on the line in bold -
function __flash__addCallback(instance, name) {
instance[name] = function () {
** return eval(instance.CallFunction("<invoke name=""+name+"" returntype=“javascript”>" + __flash__argumentsToXML(arguments,0) + “</invoke>”));**
}
}
I am doing exactly as mentioned in the flex dev guide. here are snippets of my code:
here is what i have in the html:
<object classid=“clsid27CDB6E-AE6D-11cf-96B8-444553540000”
id=“mSWF” width=“298” height=“239”
codebase=“http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab”>
<param name=“src” value="/flex/m.swf" />
<param name=“flashvars” value=""/>
<param name=“quality” value=“high” />
<param name=“allowScriptAccess” value=“sameDomain” />
<embed src="/flex/m.swf" quality=“high”
width=“298” height=“239” name=“mSWF”
align=“middle”
play=“true”
loop=“false”
quality=“high”
allowScriptAccess=“sameDomain”
type=“application/x-shockwave-flash”
pluginspage=“http://www.adobe.com/go/getflashplayer”
flashvars="">
</embed>
</object>
javascript functions - this is for different browsers-
function getFlexApp(appName) {
if (navigator.appName.indexOf (“Microsoft”) !=-1) {
return window[appName];
} else {
return document[appName];
}
}
then from another js function, i call
var flexApp = getFlexApp(“mSWF”);
flexApp.load(v);
Thanks & Regards,
diparc