Actionscript: ExternalInterface.addCallback is not working in IE -
html:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100%" height="100%" id="testqwe"> <param name="movie" value="http://www.mydomain.com/swf/testqwe.swf" /> <param name="bgcolor" value="#ffffff" /> <param name="allowscriptaccess" value="always" /> <embed name="testqwe" src="http://www.mydomain.com/swf/testqwe.swf" width="100%" height="100%" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object>
javascript:
try { if(navigator.useragent.indexof('msie') != '-1') { var embed = jquery('#testqwe')[0]; } else { var embed = jquery('#testqwe embed')[0]; } } catch(e) { log({error:e}); }
actionscript:
private function jsapi():void{ externalinterface.addcallback("callfromjs",callfromjs); } private function callfromjs(js:object):void{ //code here }
when i'm trying call embed.callfromjs() says object doesn't support property or method.
what i'm doing wrong? think problem in html markup.something missing or made mistake somewhere.
it's working in firefox/chrome/opera, doesn't in ie.
help! spent around 4-5 hours , nothing...
did verify proper block in if
getting called ie?
have tried using swfobject load swf? persoanlly, use dynamic method add things page. eliminate need browser sniffing. swfobject has api, , there call flash app id if need use static publishing.
btw, though deprecated, take @ jquery.browser instead of parsing ua string yourself. swfobject api has ua parser , flags can use.
Comments
Post a Comment