4.1 swfObject2.2调用

 

swfObject调用,是指通过第三方flash加载模块( swfobject.js ),调用本款flash播放器。虽然swfobject.js并不是adobe官方提供的,但由于其使用方便,并且swfobject参数的写法,简洁明了,所以本站比较推荐使用这种调用方式:

 

 

例(4.1)-2:swfObject2.2模式调用示例1

<script type="text/javascript" src="/player/js/swfobject22.js"></script>
<div id="CuPlayer"></div>  
<script type="text/javascript">
var flashvars = {
JcScpFile: "/player/CuSunV4set.xml",
JcScpVideoPath: "http://demo.cuplayer.com/file/test.mp4",
JcScpImg: "/player/images/startpic.jpg",
JcScpAutoPlay: "yes"
};
var params = {
menu: "false"
};
var attributes = {
id: "myplayer",
name: "myplayer"
};
swfobject.embedSWF("/player/player.swf", "CuPlayer", "600", "420", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
</script>

当您使用swfobject方式来调用播放器时,请务必确保swfobject.js文件的地址是正确的,否则,将不能正常显示播放器,将显示“网页视频播放器加载中,请稍后...

 


我要下载 获取使用帮助