Back in December 2009, I was looking for an easy way to insert flash content into Umbraco. I fell upon an already existing module, but it could not all the things I wanted and as the developer I am, I chose to develop my own flash module for Umbraco in XSLT.

Using the module

First of all you need to download the “Insert flash” module for umbraco and install it to your umbraco powered website. The module will install a macro named “Insert flash” that you can both use in your templates or in the rich text editor.

When inserting the macro you will see a screen like the one below, and when you have filled the parameters as you like, your flash content is now ready to be displayed on your website.

Inserting flash in umbraco

The parameters explained

  • Flash file – Pick a swf file from the media section to display
  • Url to file – Or type URL to the swf file to insert
    ( At least 1 of these is required )
  • Width – Width of the flash ( Pixels, Required )
  • Height – Height of the flash ( Pixels, Required )
  • Css id – An id of a html element to replace with the flash content ( Optional )
  • Url parameters – Parameters to send by Url to the flash. ( Optional )

Note about the module

This module automatically inserts a script reference to swfobject hosted by Google to enable insertion of the flash. To not have this script reference inserted every time you use the macro, move it to your template in the “head” section and remove it from the XSLT file.

Next time

Stay tuned for the next blog post, where I will dive into the xslt behind the module and the possibilities of reusing the xslt in your own xslt.