27 lines
1.3 KiB
JavaScript
27 lines
1.3 KiB
JavaScript
$.fn.extend({
|
|
insertFlash:function(src,url){
|
|
var w = this.width();
|
|
var h = this.height();
|
|
var salf = this;
|
|
this.css({"width":"800px",height:"800px","opacity":"0"});
|
|
this.append(this.genereteHtml(800,800,src,url));
|
|
if(url){
|
|
$("#conver").css({"width":w,height:h,"display":"block","position":"absolute","z-index":"10000","left":"0","top":"0"})
|
|
}
|
|
setTimeout(function(){
|
|
salf.css({"width":w,"height":h,"opacity":1})
|
|
},100)
|
|
},
|
|
genereteHtml:function(w,h,src,url){
|
|
var html ='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">';
|
|
html+='<param name="movie" value="'+src+'">';
|
|
html+='<param name="quality" value="autohigh">';
|
|
html+='<param name="wmode" value="Transparent">';
|
|
html+='<embed src="'+src+'" quality="autohigh" wmode="transparent" name="flashad" swliveconnect="TRUE" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100%" height="100%">';
|
|
html+="</object>";
|
|
if(url){
|
|
html+='<a href="'+url+'" target="_blank" id="conver"></a>';
|
|
}
|
|
return html
|
|
}
|
|
}); |