在线客服QQ: 176797520 极酷FlvPlayer在线客服 酷播网页视频播放器

4.2 object调用

object调用,是adobe官方的调用方式。以下三种写法,都是object的调用方式。object调用时一般是以flashvars传值。细心的朋友,也许会发现object代码,还含 有embed代码,确实如此,embed代码包含其中。

例(4.2)-1:object调用示例1

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="600" height="400" id="simplevideostreaming" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<param name="movie" value="/Player/player.swf" />
<param name="FlashVars" value="&JcScpFile=/Player/CuSunV2Set.xml&JcScpVideoPath=http://demo.cuplayer.com/file/test.mp4&JcScpImg=/Player/Images/CuplayerDefault.jpg" />
<param name="quality" value="high" /><param name="bgcolor" value="#000000" />
<embed src="PlayerV11.swf" flashvars="&JcScpFile=/Player/CuSunV2Set.xml&JcScpVideoPath=http://demo.cuplayer.com/file/test.mp4&JcScpImg=/Player/Images/CuplayerDefault.jpg" quality="high" bgcolor="#000000" width="600" height="400" name="simplevideostreaming" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

例(4.2)-2:object调用示例2

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="600" height="400" id="simplevideostreaming" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<param name="movie" value="/Player/player.swf?FlvID=745" />
<param name="FlashVars" value="&JcScpFile=/Player/CuSunV2Set.asp" />
<param name="quality" value="high" /><param name="bgcolor" value="#000000" />
<embed src="/Player/player.swf" flashvars="&JcScpFile=/Player/CuSunV2Set.asp" quality="high" bgcolor="#000000" width="600" height="400" name="simplevideostreaming" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

例(4.2)-3:object调用示例3

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="600" height="400" id="simplevideostreaming" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<param name="movie" value="/Player/player.swf?FlvID=745&JcScpFile=/Player/CuSunV2Set.asp" />
<param name="FlashVars" value="" />
<param name="quality" value="high" /><param name="bgcolor" value="#000000" />
<embed src="/Player/player.swf?FlvID=745&JcScpFile=/Player/CuSunV2Set.asp" flashvars="" quality="high" bgcolor="#000000" width="600" height="400" name="simplevideostreaming" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>