2012-04-15 44 views

回答

3

拥有一个像一个html:

<a class="fancybox" href="myobject.swf">open swf</a> 

使用模板传递一些参数(tpl)选项像

$(".fancybox").fancybox({ 
width: 640, // or whatever 
height: 320, 
type: "swf", 
tpl: { 
    swf: '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="wmode" value="transparent" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="'+this.href+'" /><embed src="'+this.href+'" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="100%" height="100%" wmode="transparent"></embed></object>', 
} 
}); 

可选尝试通过链接本身的参数(不使用tpl选项)like

<a class="fancybox" href="myobject.swf?wmode=opaque">open swf</a> 
+0

非常感谢你JFK这是它:) – 2012-04-15 22:52:14

+0

我不能使用tpl选项,因为我有大约30个不同的swfs。我需要通过链接本身传递每个swf的参数。我尝试了下面的内容,但是它没有提到高度和宽度,有什么建议? 'open swf' – 2015-06-12 03:40:27

+0

@AgentZebra:你在链接中试过'data-fancybox-width'和'data-fancybox-height'属性吗? – JFK 2015-06-12 03:48:58

相关问题