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

 


示例3-2-1:object调用示例

<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="CuPlayerMiniV4.swf" />
<param name="FlashVars" value="&CuPlayerSetFile=CuPlayerSetFile.xml&CuPlayerFile=test.mp4&
CuPlayerImage=images/start.jpg&CuPlayerWidth=560&CuPlayerHeight=
330&CuPlayerAutoPlay=false
&CuPlayerLogo=images/logo.png&CuPlayerPosition=top-right
" />
<param name="quality" value="high" /><param name="bgcolor" value="#000000" />
<embed src="CuPlayerMiniV4.swf" flashvars="&CuPlayerSetFile=CuPlayerSetFile.xml&CuPlayerFile=test.mp4&
CuPlayerImage=images/start.jpg&CuPlayerWidth=560&CuPlayerHeight=
330&CuPlayerAutoPlay=false
&CuPlayerLogo=images/logo.png&CuPlayerPosition=top-right
" 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>

 

示例3-2-2:object调用示例

<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="CuPlayerMiniV4.swf" />
<param name="FlashVars" value="&CuPlayerSetFile=CuPlayerSetFile.xml&CuPlayerFile=test.mp4&
CuPlayerImage=images/start.jpg
" />
<param name="quality" value="high" /><param name="bgcolor" value="#000000" />
<embed src="CuPlayerMiniV4.swf" flashvars="&CuPlayerSetFile=CuPlayerSetFile.xml&CuPlayerFile=test.mp4&
CuPlayerImage=images/start.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>