SWFObject Flash 增强插件

createCSS Advanced

使用 SWFObject 公开的内部方法创建样式表。

#p1 Test 1 (direct, default)

#p2 Test 2 (direct, screen & print media)

#p3 Test 3 (direct, default)

#p4 Test 4 (DomContentLoaded, screen)

#p5 Test 5 (DomContentLoaded, screen, new style rule)

#p6 Test 6 (onload, default)

#p7 Test 7 (onload, default)

swfobject.createCSS('#p1', 'background-color:green;');
swfobject.createCSS('#p2', 'background-color:green;', 'screen, print');
swfobject.createCSS('#p3', 'background-color:green;');

function doOnDomLoad(){
  swfobject.createCSS('#p4', 'background-color:green;', 'screen');
  swfobject.createCSS('#p5', 'background-color:green;', 'screen', true);
}l

function doOnLoad(){
  swfobject.createCSS('#p6', 'background-color:green;');
  swfobject.createCSS('#p7', 'background-color:green;');
};

swfobject.addDomLoadEvent(doOnDomLoad);
swfobject.addLoadEvent(doOnLoad);