glidealong
02-08-2008, 06:42 AM
Hi all,
I have an swf file with a method registered using externalinterface.addCallBack() api. I have embedded the swf in html using
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="792" height="660" id="targetflash" allowScriptAccess='always' >
<param name="movie" value="main.swf" / <param name="quality" value="high" />
<embed src="main.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="792" height="660" name="targetflash" allowScriptAccess='always' ></embed>
</object>
and the javascript that accesses the swf object is
<script language="JavaScript">
function getFlashMovie(movieName) {
if (navigator.appName.indexOf("Microsoft") != -1) {
return window[movieName];
}
else {
if(document[movieName].length != undefined){
return document[movieName][1];
}
return document[movieName];
}
}
It works fine in firefox, but for some reason it is failing in Internet Explorer ver 7.
Does anybody know what i am missing to make it compatible with IE?
Thanks in advance
I have an swf file with a method registered using externalinterface.addCallBack() api. I have embedded the swf in html using
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="792" height="660" id="targetflash" allowScriptAccess='always' >
<param name="movie" value="main.swf" / <param name="quality" value="high" />
<embed src="main.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="792" height="660" name="targetflash" allowScriptAccess='always' ></embed>
</object>
and the javascript that accesses the swf object is
<script language="JavaScript">
function getFlashMovie(movieName) {
if (navigator.appName.indexOf("Microsoft") != -1) {
return window[movieName];
}
else {
if(document[movieName].length != undefined){
return document[movieName][1];
}
return document[movieName];
}
}
It works fine in firefox, but for some reason it is failing in Internet Explorer ver 7.
Does anybody know what i am missing to make it compatible with IE?
Thanks in advance