有没有办法以我在IE中的方式获取chrome中的flash对象引用? IE的代码如下所示:
window[appName]
并返回一个看起来像这样的对象
window[appName]
{
saveRecordFnc : function () { return eval(instance.CallFunction("<invoke name=\""+name+"\" returntype=\"javascript\">" + __flash__argumentsToXML(arguments,0) + "</invoke>")); },
showMessageFnc : function () { return eval(instance.CallFunction("<invoke name=\""+name+"\" returntype=\"javascript\">" + __flash__argumentsToXML(arguments,0) + "</invoke>")); },
saveImageToServerFnc : function () { return eval(instance.CallFunction("<invoke name=\""+name+"\" returntype=\"javascript\">" + __flash__argumentsToXML(arguments,0) + "</invoke>")); },
saveTemplateToServerFnc : function () { return eval(instance.CallFunction("<invoke name=\""+name+"\" returntype=\"javascript\">" + __flash__argumentsToXML(arguments,0) + "</invoke>")); },
openImageFnc : function () { return eval(instance.CallFunction("<invoke name=\""+name+"\" returntype=\"javascript\">" + __flash__argumentsToXML(arguments,0) + "</invoke>")); },
setCanvasDimensionsFnc : function () { return eval(instance.CallFunction("<invoke name=\""+name+"\" returntype=\"javascript\">" + __flash__argumentsToXML(arguments,0) + "</invoke>")); },
executeFunction : function () { return eval(instance.CallFunction("<invoke name=\""+name+"\" returntype=\"javascript\">" + __flash__argumentsToXML(arguments,0) + "</invoke>")); },
start : function () { return eval(instance.CallFunction("<invoke name=\""+name+"\" returntype=\"javascript\">" + __flash__argumentsToXML(arguments,0) + "</invoke>")); },
save : function () { return eval(instance.CallFunction("<invoke name=\""+name+"\" returntype=\"javascript\">" + __flash__argumentsToXML(arguments,0) + "</invoke>")); },
exit : function () { return eval(instance.CallFunction("<invoke name=\""+name+"\" returntype=\"javascript\">" + __flash__argumentsToXML(arguments,0) + "</invoke>")); }
...
}
窗口[appName]和文档[appName]都在chrome中返回undefined。关于我做错了什么想法?
修改 这是我们使用的实际标签
<object type="application/x-shockwave-flash" data="clarkii.swf" width="100%" height="100%" id="myClarkii">
<param name="movie" value="clarkii.swf" />
<param name="bgcolor" value="#333333" />
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name="flashvars" value="redirectUrl=saveConfirm.aspx&StartupProject=<%= hdnTempFileName.Value %>&FilePath=<%=System.Configuration.ConfigurationManager.AppSettings["CarkiiFilePath"] %>&UploadScript=upload.aspx&SnapshotScript=mySnapshot.aspx&DataScript=myUpload_XML.aspx" />
<a href="http://www.adobe.com/go/getflashplayer">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="<%= Resources.bicweb_resources.GET_ADOBE_FLASH_PLAYER %>" />
</a>
</object>