Page 1 of 1

Embed Flash SWF file in entry

Posted: Fri Mar 19, 2010 6:04 pm
by LenB

I did some searching and could not find all of the answers I was looking for, so I did some of my own experimentation with good results. I'd like to share my results so that others might benefit:

I have my own video player that is a flash SWF file. It pulls in my own video FLV files. What I wanted to do was to post my SWF file inside of my entry such that it was positioned where I wanted it and without those annoying dotted lines (focus) around it. Here is the code I was able to create, with special notes following:

<object type="application/x-shockwave-flash" style="width:450px; height:358px; display: block; margin-left: auto; margin-right: auto; outline: none;" data=""><param name="movie" value="" <param name="wmode" value="transparent" /></object>

display: block; margin-left: auto; margin-right: auto; - this code designates the flash file as a block, therefore allowing proper positioning. In this case I have centered my flash file using auto left and right margins.

outline: none; - this code removes the focus dotted outline that I always find so annoying when it surrounds my flash files.

<param name="wmode" value="transparent" - this code allows the background color of your htnl page to show through while the SWF file is loading.

This code should work with any flash file, regardless of whether it's used to call in a FLV movie or not. I tested it using the Joshua_nino template and it seems to work in both Firefox and IE, although I have not tested it in any other browsers.

I hope someone finds this useful.

Len B