Embed Flash SWF file in entry

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
LenB
Posts: 3
Joined: Fri Mar 19, 2010 6:31 pm

Embed Flash SWF file in entry

Post by LenB » Fri Mar 19, 2010 7:04 pm

Hello,

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="http://www.DomainName.com/FlashFileName.swf"><param name="movie" value="http://www.DomainName.com/FlashFileName.swf" <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

Post Reply