It is no more a difficult task to embed video and player on web page, if you following the instructions below with sample HTML code.
When you convert video to Flash with the full version of Flash Video MX choosing the progressive download option on the program, get the player template pack after purchasing from the skin page, or related resource pages like Christmas activity, you will get the web FLV player with swf as file extension, which could be used directly on web page. Most of the players include playlsit component, and you need to make the player to display single flash video or make sure you get the player without playlist component, before following the instructions below.
Here is the sample HTML code for you to embed player with single flash video. myPlayer.swf is the web FLV player without playlist, and playerbox.flv is the flash video.
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="480" height="400">
<param name="movie" value="myPlayer.swf">
<param name="FlashVars" value="videoFile=playerbox.flv">
<param name="quality" value="high">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="True" />
<embed src="myPlayer.swf" FlashVars="videoFile=playerbox.flv" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="480" height="400" allowScriptAccess="sameDomain" allowFullScreen="True">
</embed>
</object>
If you put the html file, swf file and the flv file to the same folder when uploading to your server, the above coding is enough for you. You can change the flash video file name as you like and change myPlayer to the player file name you get. Please note that the changes shall apply to both the OBJECT tag and EMBED tag.
If you want to put the three files into different directory, you may modify the HTML code. For example, you put the html file to a folder named "page", the swf file to a folder named "player", and the flv file to a folder named "video". You shall change the swf file path according to the html file, and the flash video file path according to the swf file, because the html file shall read the swf file, and the player file shall recognize the video file path. Thus, the HTML code should go as follow after changing the location.
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="400" height="340">
<param name="movie" value="../player/myPlayer.swf?videoFile=../video/playerbox.flv">
<param name="quality" value="high">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="True" />
<embed src="../player/myPlayer.swf?videoFile=../video/playerbox.flv" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="480" height="400" allowScriptAccess="sameDomain" allowFullScreen="True">
</embed>
</object>
Note: The code ../ is added because the files are in different folders. You can also use the direct HTTP URL for the files.
2009-11-19