Embed A SWF Video In XHTML

I took a 640px X 480px video of snow falling in Calgary recently and embedded it into XHTML. Here’s how it was done:

First, the .AVI file was imported into Flash. The height of this Flash file was set a little higher than the video (to 524px) in order for the video control skin to be displayed at the bottom of the video. The resulting SWF file was then placed into a directory called VIDEOS…though as mentioned in an earlier post, the SWF file for the video control skin had to be in the same directory as the XHTML file accessing it.

The XHTML code was as follows:

<object type="application/x-shockwave-flash" data="videopath/videoname.swf" height="524" width="640" ><param name="wmode" value="transparent" /></object>

The param name and param value settings here make the background color of the SWF stage transparent, so that the SWF movie seamlessly blends into the XHTML page.


The XHTML code displayed here is word-wrapped for ease of viewing. If copying & pasting, do not add returns to this code!

This entry was posted in Flash, Flash - Video. Bookmark the permalink.