<script src="/js/swfobject.js" type="text/javascript"></script> //file为播放文件,如xiyouji.swf,sanguoyanyi.swf var so = new SWFObject(file, "swf1", "500", "400", "9", "#FFFFFF"); so.addVariable("variable1", getQueryParamValue("variable1")); so.addVariable("variable2", getQueryParamValue("variable2")); so.write("flashcontent");
由于播放文件中还有播放器?怎么设置全屏啊?
试试:
var so = new SWFObject(file, "swf1", "100%", "100%", "9", "#FFFFFF"); so.addParam("allowFullScreen", "true"); so.addParam("wmode", "window"); so.write("flashcontent");
不行啊!不起作用!
@学之乐:
试试下面的代码:
var swfobjec = new SWFObject(); var flashvars = {}; var params = { scale: "exactFit" }; var attributes = {}; swfobject.embedSWF("mymovie.swf", "flashcontent", "100%", "100%", "7", false, flashvars, params, attributes);