• 18 Sep 2009
  • Posted by ESA
  • Comments Off

The simplest way to add any published HD Media Player SWF to a webpage is to use html “Flash Object and Embed” tags. All of our downloadable packages include a sample html page that includes the object and embed tags for embedding that particular example, so you can copy and paste these scripts into your own web document wherever you want the player to appear (you should be in “code” view of your html editor when copying and pasting).  It is important to learn how these scripts are configured so you can modify them to meet your needs (please note: you should not modify embed codes that were created using our online Skin Wizard).

Below are the object and embed tags used to embed the default.swf included with our default player packages. The “object” tag is used by Internet Explorer, and the “embed” tag is used by browsers like FireFox and Netscape (italics), so it is important to update variables in both tags for the player to work correctly in all browsers. The path to the SWF (red text) can be absolute or relative. The Flash Player width and height attributes (orange text) can be used to resize the default.swf as follows (starting v.1.5.3): set the width equal to your desired media width in pixels; set the height equal to your desired media height in pixels plus the height of the controls (default controller height is 30 pixels); for example, if you want to play videos at 320 x 240, then you would set the “width=320″ and “height=270″; the minimum width for the default skin is 320 pixels (please note: with other skins like the Media Grid that do not include auto-resizing scripts, the height and width attribues should be equal to the SWF size). By default, all of our players use FlashVars to specify the absolute or relative path to a single audio/video file or XML playlist (blue text). The other attributes and parameters are either required by Flash Player or they are used to enable certain player features (”enablefullscreen” is required if you want the player to go to fullscreen; “enablescriptaccess”, object “id”, and embed “name” are used for tracking and javascript). NOTE: if you use relative paths for the player or media locations they must be relative to the location of the page where the SWF is displayed, not the location of the SWF on your server.

<object classid=”clsid:d27cdb6e-ae6d-11cf-96b8-444553540000″ 
width=”640″ height=”390″ id=”ESAHDMP” >
<param name=”movie” value=”default.swf” />
<param name=”allowfullscreen” value=”true”/>
<param name=”allowscriptaccess” value=”always”/>

<param name=”FlashVars” value=”media=media.xml” />
<param name=”wmode” value=”transparent” />
<embed src=”default.swf” width=”640″ height=”390″ FlashVars=”media=media.xml” allowfullscreen=”true”
allowscriptaccess=”always” type=”application/x-shockwave-flash” wmode=”transparent”
pluginspage=”http://www.macromedia.com/go/getflashplayer” name=”ESAHDMP” />


While it is possible to automatically generate html tags for embedding Flash objects like our HD Media Player (e.g. using Flash or Dreamweaver), it is generally not recommended with our default players, because the automatically generated tags will not include some of the necessary parameters including the FlashVars. In addition, the automatically generated tags are often much longer than what you see above, and contain unnecessary attributes and parameters.

Click here to learn more about Flash Object and Embed Tags


Support - Documentation - Skin Wizard - Sample Skins - Tutorials
Copyright © 2003-2011 Earth Science Agency, LLC - All Rights Reserved