Only three steps are needed to complete the guide.
3. Transfer HTML parameter to Flash SWF
1. Get your web FLV player.
There are sample players at the Skins page on player-box.com generated by Moyea PlayerBox. Choose a web player without playlist and download, or download the project file with playlist and delete the playlist component when loading into Moyea PlayerBox.
You can generate one web player with Moyea PlayerBox. If you have not installed the program yet, click here to download the free trial version, and you can design your own player. To follow this guide, please do not add playlist to the output web FLV player.
2. Get your FLV video ready.
The videos for the web player shall be in FLV format. You can use videos on local machine and then upload to your site, or use existing FLV URL with HTTP and RTMP.
Generally, you are asked to place the FLV file together with the SWF file to simplify the code on HTML page. When the FLV file is in the same folder with the SWF file, you do not have to handle the HTML code in a complicated way, only the file name is needed.
Well, to enable your player on different page with different video, you shall start editing HTML code. It is not a big deal. On local machine, we have "\" to separate the folder, but we have "/" on html code.
When you get FLV URL, it is very clear to include URL too.
If your video is not in FLV format, it is recommended that you use converter to get FLV ready.
3. Transfer HTML parameter to Flash SWF.
There are 3 ways to pass HTML code to Flash SWF:
• Add transfer code symbol "?" at the end of the SWF address
• Use FlashVars to transfer parameter
• Control with JavaScript (JS)>
Here we only describe above the first two ways, JS is not mentioned below. In HTML code, it is common to use <Object> tag and <Embed> tag to insert SWF file. It is also what Adobe recommended as both tags enable most visitors to watch the Flash. The <Object> tag is for Internet Explorer, while <Embed> tag for Netscape.
By default you will get the following HTML code:
<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="testing.swf">
<param name="quality" value="high">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="True" />
<embed src="testing.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="480" height="400" allowScriptAccess="sameDomain" allowFullScreen="True">
</embed>
</object>
To pass HTML parameter code to SWF to play specified FLV, you can use the following sample code. The following samples are based on the circumstance that the SWF file is in the same folder of the HTML page. Below are the Flash variables for the SWF FLV player generated by Moyea PlayerBox without playlist. Change the FLV video to play with videoFile= and the first image file with firstFrame=. If you want to change both variables, use "&" to connect the two. The variable for first image file also applies to player with playlist.
Add transfer code symbol "?" at the end of the SWF address
If your FLV file and image file are in the same folder with the SWF file, you may use the sample code below:
<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="testing.swf?videoFile=moyea.flv&firstFrame=moyea.jpg">
<param name="quality" value="high">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="True" />
<embed src="testing.swf?videoFile=moyea.flv&firstFrame=moyea.jpg" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="480" height="400" allowScriptAccess="sameDomain" allowFullScreen="True">
</embed>
</object>
The above mentioned moyea.flv is the sample FLV file name. If you do not want to display first image on player, you may delete &firstFrame=moyea.jpg from the code.
If you get FLV URL, you may use the sample code below:
<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="testing.swf?videoFile=http://www.player-box.com/flv/moyea.flv">
<param name="quality" value="high">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="True" />
<embed src="testing.swf?videoFile=http://www.player-box.com/flv/moyea.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>
The above http://www.player-box.com/flv/moyea.flv is the FLV video URL. If you know the direct URL of another FLV video you want to display, you can replace the HTTP URL to HTTP or RTMP protocol.
Use FlashVars to transfer parameter
You shall add a new line with <param name="FlashVars" value="videoFile=…"> below the Movie parameter.
If your FLV file and image file are placed together with the SWF file, you may use the sample code below:
<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="testing.swf">
<param name="FlashVars" value="videoFile=moyea.flv&firstFrame=moyea.jpg">
<param name="quality" value="high">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="True" />
<embed src="testing.swf" FlashVars="videoFile=moyea.flv&firstFrame=moyea.jpg" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="480" height="400" allowScriptAccess="sameDomain" allowFullScreen="True">
</embed>
</object>
To add FLV video URL, just replace the file name to URL for HTTP or RTMP.
<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="testing.swf">
<param name="FlashVars" value="videoFile=http://www.player-box.com/flv/moyea.flv">
<param name="quality" value="high">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="True" />
<embed src="testing.swf" FlashVars="videoFile=http://www.player-box.com/flv/moyea.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>
Learn More About Moyea PlayerBox
Free Trial



