Movie Masher

open source video editing tools for your site

HomeExamplesFAQDocumentationDownload

Applet Embedding

Like other web applets, Movie Masher is placed within a standard HTML page on your site. There are several ways to go about this, and any one of them should work fine as long as the proper variables are passed to the applet.

The index file in each example implementation includes a JavaScript file at media/js/swfobject/swfobject.js which uses AJAX to dynamically generate the HTML tags that actually display the applet. This script is a recent version (2.1) of SWFObject originally by Geoff Stearns, which is released under the super open MIT License. This may not be the latest version though, so check the SWFObject Project for updates.

Getting the applet to scale as the user resizes their browser window can be a little tricky... The applet must be the only content on the page, and setting its width and height to 100% is not sufficient for all browsers. A style sheet must also be used to specify 100% height for HTML, BODY, and any other tag that contains the applet (the examples use an identifiable DIV). Additionally the HTML tag should have 'overflow' equal to 'hidden' (to avoid scrollbars) and BODY should have zero for 'margin' and 'padding'.

Applet Variables

  • config - file URL to a CGI script or static XML document that contains the initial configuration. Learn more in Configuration Loading.
  • base - directory URL (no trailing slash) used to resolve all relative URLs in the configuration. The example implementations use JavaScript to populate this variable with the parent directory of the page.
  • policy - file URL to cross domain policy file (default is /crossdomain.xml). Learn more about loading applets and security issues in the Adobe Flash™ documentation.
  • preloader - file URL to an SWF file to display while everything else loads.

Applet Parameters

  • allowFullScreen - set to 'true' to allow Player control to fill the whole screen, rather than just the applet area.

  • allowScriptAccess - set to 'always' or 'sameDomain' to allow CGI control to call JavaScript function in the page.
© Movie Masher 2006-2010