我不知道你是如何设置链接的,但我会这样做:
HTML(href中的视频URL和rel中的视频图像)
<a class="flash" href="http://hometownquarterlyvideos.s3.amazonaws.com/whatishqchannel.flv" rel="/flash/video_girl/whatishqchannel.jpg">Flash</a>
脚本(未测试)
$(document).ready(function(){
// click on flash video link
$('.flash').click(function(){
$.facebox('<div id="fbvideo"></div>');
var so = new SWFObject('/flash/playerTrans.swf','fbvideo','640px','360px','0');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addParam('wmode','transparent');
so.addVariable('file', $(this).attr('href'));
so.addVariable('autostart','true');
so.addVariable('controlbar','none');
so.addVariable('repeat','always');
so.addVariable('image',$(this).attr('rel'));
so.addVariable('icons','false')
so.addVariable('screencolor','none');
so.addVariable('backcolor','FFFFFF');
so.addVariable('screenalpha','0');
so.addVariable('overstretch', 'true');
so.write('fbvideo');
return false;
})
})