SWFObject in the Default Publish Profile

by Paul Spitzer
Friday, May 5th, 2006

As I’m sure most of you out there already know, recent changes to Microsoft’s Internet Explorer force a change in the way we embed Flash files in our HTML. At Fluid we’ve been using SWFObject , a useful bit of JavaScript that handles these changes quite nicely. The other day, after publishing several .fla files and having to update the generated HTML each time and eventually growing quite tired of the process, I decided it was time to give SWFObject a more permanent home.

The solution, modify Flash’s default publish profile to include a modified HTML template that uses SWFObject instead of the standard Object and Embed tags. Now, when I publish HTML with my .fla files Flash uses this new SWFObject enabled HTML. I was so happy with the result that I decided to package it up into an extension for others to enjoy.

You can find the extension along with release notes here.

  • del.icio.us
  • Facebook
  • email
  • LinkedIn
  • Twitter

7 Responses to “SWFObject in the Default Publish Profile”

  1. felix Says:

    Great stuff! Seems like SWFObject is quickly becoming the standard embedding technique. They are even using it on Adobe.com.

    One question: Is there a way to automatically add the ’swfobject.js’ file on Publish?

  2. Chris Charlton Says:

    Much thanks! I started this and just got bogged with work. Adobe’s solution is also an extension with Publishing templates (one https other http).

  3. John Giotta Says:

    I did this for internal use where I work.
    Except I didn’t set it to the default template.

  4. Jerry Young Says:

    doesnt seem to work properly if size is set to 100% with scale set to no scale

    win2000 prof flash 8 published as 7

  5. paul Says:

    Thanks for the replies.

    >Is there a way to automatically add the ’swfobject.js’

    I looked and short of adding the JavaScript to the HTML I do not think it is possible using the current publishing mechanisms provided Flash and JSFL. It would be possible however to write a command to do the job. Is this something of interest?

    >doesnt seem to work properly if size is set to 100%

    I’ve updated the extension adding support for additional parameters like size, scale mode, etc. The latest files are on the extension’s page. Enjoy!

  6. Martin Says:

    I just thought I’d report that I had no problems installing (and quickly testing) your extension on a Mac with Flash 8.

    Nice work BTW. Really handy to have this in directly in Flash.

  7. Danko Says:

    I use the SWFObject Publish Profile Extension for a Flash.
    It works OK, but I’d like to have a version of Flash inside the tag (so if the Javascript is disabled, it displays the OBJECT/EMBED version of Flash. Okay, it has the “Click to activate…” message – but that’s the price of disabled Javascript :-) ).

    It could be done through a configurable parameter useNoScript (true/false).
    It would be of a great help! :-)

    Thanks!