0
在我的代碼有初始化函數swf文件可以用`ExternalInterface.call()`函數初始化爲javascript嗎?
HTML
<embed id="SoundsObj"........
JS
var SoundsObj = document.getElementById('SoundsObj');
function GetSoundsObj(){
alert(top.SoundsObj.SndPlay); //I can see it has initialized itself
}
AS3
ExternalInterface.call("GetSoundsObj");
我很好奇有沒有我可以通過SWF對象的可能性在JS中作爲的第二個參數0反擊?
像
在AS3
ExternalInterface.call("GetSoundsObj",this); //by `this` I mean swf object
在JS
var SoundsObj = null;
function GetSoundsObj(arg){
SoundsObj = arg;
alert(SoundsObj.SndPlay);
}
完全確信該SWF-JS橋是嗎?