SMI! Series Logo
Flag of Poland

  M2 / Player

The M2 /® Player is a web media player that supports playback of FLV movies.

The player is free for commercial and non-commercial use. It is provided on SMI! Free License.

This section describes a process of how to install and embed the M2 /® Player onto your page.

Step 1: Download the latest version of swfobject 2 from You need just one file: swfobject.js from the package.

Step 2: Transfer the m2player.swf and swfobject.js file to your website. (Make sure that you’ve also uploaded all the necessary videos).

M2 /® Player 1.03 is available here -> m2player_1.03.swf

Step 3: Embed the player in your HTML page with the lines of code below. Important lines are bolded. Note: If you place the files in different directories, make sure to set the references in this code accordingly.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="" lang="en" xml:lang="en">
<title>M2 / Player installation example</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="swfobject.js"></script>

<script type="text/javascript">
swfobject.embedSWF("m2player.swf", "player", "400", "300", "9.0.0", false, {vSource:"example.flv"}, {allowfullscreen: "true"});
<div id="player">
<p>The player will show in this paragraph</p>

swfobject.embedSWF(swfUrl, id, width, height, version, expressInstallSwfurl, flashvars, params, attributes) has five required and four optional arguments:

    1. swfUrl (String, required) specifies the URL of your SWF

    2. id (String, required) specifies the id of the HTML element (containing your alternative content) you would like to have replaced by your Flash content

    3. width (String, required) specifies the width of your SWF

    4. height (String, required) specifies the height of your SWF

    5. version (String, required) specifies the Flash player version your SWF is published for (format is: "major.minor.release")

    6. expressInstallSwfurl (String, optional) specifies the URL of your express install SWF and activates Adobe express install [ ]. Please note that express install will only fire once (the first time that it is invoked), that it is only supported by Flash Player 6.0.65 or higher on Win or Mac platforms, and that it requires a minimal SWF size of 310x137px.

    7. flashvars (Object, optional) specifies your flashvars with name:value pairs

    8. params (Object, optional) specifies your nested object element params with name:value pairs

    9. attributes (Object, optional) specifies your object's attributes with name:value pairs

NOTE: You can omit the optional parameters, as long as you don't break the parameter order. If you don't want to use an optional parameter, but would like to use a following optional parameter, you can simply pass false as its value. For the flashvars, params and attributes JavaScript Objects, you can also pass an empty object instead: {}.