jqueryTools之Flashembed使用

一.这是一个关于网页插入flash的应用

<div id="clock"></div>
flashembed("clock", "/media/swf/global/clock.swf");//把指定flash插入到指定元素中,这种默认的情况下,flash元素位于页面其它元素最顶层,若把它放在其它元素之下,可以将flash设置成无窗口的模式:wmode:’opaque’
flashembed('clock',{src:’xx.swf’,wmode:’opaque’});
 
二.通过点击时再播放flash,两种写法:
1. document.getElementById(‘clock’).onclick=function(){
       flashembed(this,’xx.swf’);
    }
2.jquery的写法
  $(function(){
       $(“#id”).click(function(){
         $(this).flashembed(‘xx.swf’);
        });
   });
 
三.处理旧的flash版本
<div id="clock">
<h2>需要Flash版本20,0或者更高的版本</h2>
<h3>你的flash版本为: version is 9,31</h3>
<p>
Download the latest version from
<a href="http://www.adobe.com/go/getflashplayer">here</a>
</p>
</div>
flashembed("clock", {
src: "/media/swf/global/clock.swf",
version: [20, 0],//播放flash需要的版本号
  expressInstall:’xx.swf’,//提代安装的指定flash安装文件地址
  onFail:function(){ //如果安装失败
        document.getElementById(“info”).innerHTML=’你需要安装flash20.0以上版本才能运行’;
  }
});
posted @ 2012-03-18 11:37  奎宇工作室  阅读(252)  评论(0编辑  收藏  举报