swfobject 2.2 showExpressInstall -> How do you specify your desired version of flash?
With swfobject 2.2, how do you specify the desired version of fl开发者_JAVA技巧ash you require? I need flash 10, but swfobject won't perform an upgrade install with the provided expressInstall.swf
in the swfobject 2.2 distributable. How do I get an upgrade install to occur for flash 10?
The following line requires v.10:
swfobject.embedSWF("mymovie.swf", "altContent", "800", "600", "10.0.0","expressInstall.swf", {}, {}, {});
Note that "altContent" should be the ID of some element in your HTML that you want the flash movie to replace, while "800" and "600" are the heigh and width, respectively. An example of usage:
<script type="text/javascript">
var flashvars = {};
var params = {
allowscriptaccess: "samedomain"
};
var attributes = {
id: "flashMovie",
name: "flashMovie"
};
swfobject.embedSWF("myMovie.swf", "altContent", "800", "600", "9.0.0","expressInstall.swf", flashvars, params, attributes);
</script>
精彩评论