FLASH控件激活问题的解决办法

 

参考E文地址http://blog.deconcept.com/swfobject/

这个JS可以在上述的网站下载,使用非常 

< div  id ="flashcontent" > 这里放上你想替换flash的文字。 </ div >

    
< script  type ="text/javascript" >  
    
var fo = new FlashObject("http://www.s-teda.com/images/bannerbusiness.swf""mymovie""703""102""7""#FFF"); 
    fo.write(
"flashcontent"); 
    
</ script >  

解释一下FlashObject各个参数

定义是这样的:

 

var  so  =   new  SWFObject(swf, id, width, height, version, background - color [, quality, xiRedirectUrl, redirectUrl, detectKey

比需参数部分:

  • swf - 就是要显示的flash文件
  • id - 就是你这个flash Object的ID.
  • width - 宽.
  • height - 高.
  • version - flash播放器版本号. An example would be: "6.0.65". Or you can just require the major version, such as "6".
  • background-color - 背景色.

选填参数部分:

  • quality - The quality you wish your Flash movie to play at. If no quality is specified, the default is "high".
  • xiRedirectUrl - If you would like to redirect users who complete the ExpressInstall upgrade, you can specify an alternate URL here
  • redirectUrl - If you wish to redirect users who don't have the correct plug-in version, use this parameter and they will be redirected.
  • detectKey - This is the url variable name the SWFObject script will look for when bypassing the detection. Default is 'detectflash'. Example: To bypass the Flash detection and simply write the Flash movie to the page, you could add ?detectflash=false to the url of the document containing the Flash movie.

 

还可以这样用

< script  type ="text/javascript" >
   
var so = new SWFObject("movie.swf""mymovie""400""100%""8""#336699");
   so.addParam(
"quality""low");
   so.addParam(
"wmode""transparent");
   so.addParam(
"salign""t");
   so.write(
"flashcontent");
</ script >

这样用:

< script  type ="text/javascript" >
   
var so = new SWFObject("movie.swf""mymovie""400""200""8""#336699");
   so.addVariable(
"variable1""value1");
   so.addVariable(
"variable2""value2");
   so.addVariable(
"variable3""value3");
   so.write(
"flashcontent");
</ script >

这个更强悍(取得本页的query参数)

< script  type ="text/javascript" >
   
var so = new SWFObject("movie.swf""mymovie""400""200""8""#336699");
   so.addVariable(
"variable1", getQueryParamValue("variable1"));
   so.addVariable(
"variable2", getQueryParamValue("variable2"));
   so.write(
"flashcontent");
</ script >
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值