So Dreamweaver has some nice little built in FLV Players and functionality to insert them on a page for you. Only problem is they make use of the old ‘object’ and ‘embed’ tags. SWFObject is a much more graceful, standards-compliant method for adding Flash to your site, so why not combine the two?

I wanted to use the progressive player that Dreamweaver provides, so I generated the code, pulled out the flashvars and parameters and inserted them into the SWFObject code like so:

(Line wraps marked »)

<script type="text/javascript">
    var flashvars = {
        skinName: "video/Clear_Skin_3",
        streamName: "MyVideoTitle",
	autoPlay: true,
	autoRewind: false
    };
    var params = {
        movie: "video/FLVPlayer_Progressive.swf",
	salign: "tl",
	quality: "high",
	scale: "noscale"
    };
    var attributes = {};

    swfobject.embedSWF("video/FLVPlayer_Progressive.swf", "FLVPlayer", »
    "800", "600", "9.0.0","video/expressInstall.swf", flashvars, params, »
    attributes);
</script>

The important thing here being, that the path to the video file is relative to the player SWF (in this case ‘FLVPlayer_Progressive.swf) NOT the page calling it – Nice!


Subscribe to comments Comment | Trackback |
Post Tags:

Browse Timeline


Comments ( 1 Comment )

[...] jloop == outburst » SWFObject and Dreamweaver FLV Player [...]

What Is SEO Mated | SEO Mated Review added these pithy words on May 19 10 at 6:11 am

Add a Comment


XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>