SWFObject Flash 增强插件

removeSWF

移除已加载的 FLASH。

加载 SWF | 删除 SWF

请手动加载 FLASH

var swfs = ['swf/test6A.swf', 'swf/test6B.swf', 'swf/test6C.swf'];

function create(){
  if (swfobject.hasFlashPlayerVersion('6')) {
    // check if SWF hasn't been removed, if this is the case, create a new alternative content container
    var c = document.getElementById('content');
    if (!c) {
      var d = document.createElement('div');
      d.setAttribute('id', 'content');
      document.getElementById('content-container').appendChild(d);
    };
    // create SWF
    var att = {
      data: swfs[0],
      width: '300',
      height: '120'
    };
    var par = {
      menu: 'false'
    };
    var id = 'content';
    swfobject.createSWF(att, par, id);
    // rotate SWFs
    var s = swfs.shift();
    swfs.push(s);
  }
};

function remove() {
  swfobject.removeSWF('content');
};

function addHandlers() {
  var c = document.getElementById('create');
  if (c) {
    c.onclick = function() {
      create();
      return false;
    };
  };
  var r = document.getElementById('remove');
  if (r) {
    r.onclick = function() {
      remove();
      return false;
    };
  };
};

swfobject.addLoadEvent(addHandlers);