- 3.代码使用
- 3.1 [A]swfObject调用
- 3.2 [B]object调用
- 3.3 [C]Ebemb调用
- 3.4 [D]JS形式调用
- 3.5 getNext函数用法
- 3.6 与ASP程序结合
- 3.7 与PHP程序结合
- 3.8 与.Net程序结合
- 3.9 与JSP程序结合
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>