我在我的AS3項目中使用ExternalInterface
做一些東西通過Javascript,但現在我需要用它來調用一些屬於一個對象的函數。ExternalInterface來調用一個函數屬於一個JS對象
像這樣的東西(AS3):
ExternalInterface.call("VIEWER.loadComplete");
JS代碼:
var VIEWER = {
loadComplete: function(){
$('#'+this.maindiv).children('.mask').hide();
$('#'+this.viewer).css({
width: '640px',
height: '480px',
overflow: ''
});
}
}
這不是在Chrome(只適用於Firefox,我不知道爲什麼要麼)工作。有人能以這種方式澄清我嗎?
感謝您的信息,RafH。我真的需要使用ExternalInterface,所以我能做什麼?你認爲有其他選擇嗎? – 2013-04-28 14:13:36
當您使用http://訪問您的內容時,您可以使用ExternallInterface,它可以與PPAPI播放器一起使用。問題只在於本地訪問(file://)。 – RafH 2013-04-28 14:21:24
即使使用http訪問,我仍然遇到問題。有任何想法嗎? :( – 2013-04-30 10:18:41