关于
Github
中文文档

SWFObject Flash 增强插件

getObjectById

获取加载 Flash 元素。

替代内容

您的浏览器未安装 Flash Player

Get Adobe Flash player

swfobject.registerObject("myCom", "9.0.0", "swf/expressInstall.swf");

function AStoJSviaExternalInterface(str) {
  document.getElementById("receive1").value = str;
};

function myCom_DoFSCommand(command, args) {
  document.getElementById("receive2").value = args;
};

function AStoJSviaGetURL(str) {
  document.getElementById("receive3").value = str;
};

window.onload = function() {
  document.getElementById("but1").onclick = function() {
    var obj = swfobject.getObjectById("myCom");
    if (obj && typeof obj.JStoASviaExternalInterface != "undefined") {
      obj.JStoASviaExternalInterface(document.getElementById("send").value);
    }
  };

  document.getElementById("but2").onclick = function() {
    var obj = swfobject.getObjectById("myCom");
    if (obj && typeof obj.SetVariable != "undefined") {
      obj.SetVariable("JStoASviaSetVariable", document.getElementById("send").value);
    }
  };
};