FlashObject 1.3 Released

I have just released version 1.3 of FlashObject. Changes are as follows:

  • [Changed] When calling FlashObject.write() you can now pass an HTMLElement reference. Previously you needed to pass a string (the Id of the element to write the Flash content to)
  • [Changed] Made changes to the plugin detection routine that would cause a crash in browsers running certain versions of the Flash plugin. Read a comprehensive description of the issue and the fix.
  • [New] You may now specify a specific URL to redirect the user to after they complete an ExpressInstall process. Previously the script would always redirect them to the page the Flash movie was embedded in, but when using a popup window this is not always the best solution. See the ExpressInstall section of the FlashObject page for more information.
  • [New] FlashObject now integrates seamlessly with the Javascript Integration Kit. More information on this is forthcoming in a new blog post.
  • [New] I’ve used Dojo Shrinksafe to strip out the extra space in the flashobject.js file. FlashObject now weighs in at just a hair over 6kb. Super tiny! The FlashObject ‘source code’ (un-shunken Javascript) is included in the FlashObject zip file in the ‘source’ folder. I also made a number of small syntax changes to reduce the size even more.

I’ve updated the FlashObject page to reflect these changes. I recommend that everyone should upgrade if you are using any older version of FlashObject. If you are upgrading from v. 1.2, you can simply replace your flashobject.js file and you should be ready to go. Versions earlier than 1.2, you may need to make minor adjustments to your embed code (see the changes to v. 1.2 for help with that)

UPDATE (1-25-2006): Found a small bug in this latest version that caused the Flash movie to not load on IE 5.01 on PC. The bug has been fixed and the zip/source has been updated. Please update to the latest version if you are using 1.3 and have a lot of users using IE 5.01 (does anyone have a high number of those anymore?). The new version number is 1.3b.

191 thoughts on “FlashObject 1.3 Released

  1. Hi Geoff, thanks a lot for your script (I was at your presentation to LAFO from laflash.org), it works wonderfully! I was wondering how I can modify it so that the script passes the usual fix:

    to stop browsers from caching the swf without breaking functionality.

    I’ve tried variations on this:
    var fo = new FlashObject(“swfs/samplesC2A.swf?” + new Date().getTime()”, “samples”, “225”, “200”, “6”, “#FFFFFF”);

    which doesn’t really work

    and this:

    fo.addParam(“movie”,”? + new Date().getTime()”);


    fo.addParam(“swf”,”? + new Date().getTime()”);

    My javascript isn’t that great, so I was wondering if you had any input on this.

    thanks in advance,


  2. argh…my example of the usual fix didn’t write to the comment

    hopefully one of these works:




  3. ok, i need to learn to follow directions (by reading the text below the Submit button…)

  4. Hi Goeff, I am using your ‘flash object’ and all seemed fine, until I got a freind to test my site (www.pixeldesignstudio.co.uk) he gets the ‘please install flash’ .gif I used when flash is not installed, however when he follows the link (http://www.macromedia.com/go/getflashplayer/) it says he already has flash installed. The flash Items on my page require flash 8 (for the title) and flash 6 for the menu. Any ideas what the problem might be? Wasnt sure if the ‘flashobject.js file would need editing in order for Flash 8 files? Help please…..

  5. Hi Geoff, I beleive I’ve highlighted an issue with FlashObject 1.3 using fo.addParam(“redirectUrl”,”URL”)
    In Mozilla, if the client doesn’t have the Flash plugin installed at all and the redirectUrl param is used (not the attribute), the redirect doesn’t take place. The redirect is trying to use the empty attribute value and not the param value.

  6. Hello Geoff,
    I tested FlashObject1.3d with NS 4.79 and he told me some errors:

    “try” is a reserved identifier and “FlashObject” is not defined

    It’s possible to make NS4 supported?

  7. Gary:

    You need to use fo.setAttribute() to set the redirect url – addParam is only for Flash player parameters. The redirect is controlled by the FlashObject script.


    At this time I’ve abandoned Netscape 4.x support. Too few people use it to make it worth while to support all the quirks in it.

  8. Thank you for your answer. I have no way, i must be a support of NS4, because a lot of children who visit my new project (charitable trust) have not a new computer and have not money for a new pay.
    But it’s not a Problem, i found a workaround and the script is runs:-)

    Greatings Asgardt

  9. Please forgive me a million times over if this is the improper place to post this question, or if this issue has been addressed, and I am too ignorant to have understood it, but I am at a loss and this seems to be the correct site to get the help I need:

    I have a Flash website, and it has always worked well up until a couple months ago. What is happening is that the page where the Flash movie is embedded treats the entire Flash movie as a link, therefore, when someone needs to click on what I made to actually be a link, they have to click twice. (the first time there appears a link highlight around the entire Flash movie. Also, there is another page on my website where there is both HTML and the embedded Flash but now the Flash will not appear, but strangely still has the highlight around it when you hover your mouse over it, even though the Flash itself will not appear. Is there anyone who can help me, or direct me to some place where I can get the assistance I need? Thank you so very much, in advance!

  10. Eric: What’s happening is that Microsoft released an update to Internet Explorer so people now have to ‘activate’ your Flash movies by clicking on them first. To fix it, try embedding your Flash movies using FlashObject.

    For more info on it, you can read this page.

  11. I have two XPSP2, IE6, Flash Player 8 computers in my office that are refusing to load movies via FlashObject, but another computer with the same setup except for Flash Player 8.5 works fine (8.5 as a result of testing Flex 2 beta).

    I’ve tracked it down to line 131 in flashobject.js (v1.3c)

    var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");

    When I add an alert to the try/catch block wrapping this I see the error message “Automation server can’t create object.”. So, since it’s unable to instance the player object it’s unable to detect the flash version and aborts (I assume).

    However, another movie on the same page that is loaded using the usual embed/object tag setup works fine.

    I can’t seem to track down any setting in IE / Security Zone stuff that would be causing it. I’m wondering if this points to a problem with a corrupt Flash Player install on those PCs. Any thoughts?

  12. Fixed it by uninstalling Flash Player on those PCs and reinstalling it via the Macromedia installer page. The only thing was simply using the Windows add/remove programs to uninstall it wouldn’t work, IE would keep hold of it’s own control somehow and never prompt for a re-install.

    Had to resort to using the Flash Uninstaller program from here:

    Sigh :(

  13. Thanks again and again for this work, so glad I found it
    Now if I could only get it to work :)
    The issue is this – If I set the required version of 6,7, or 8 it works fine in Firefox, Netscape. Mozilla However not in IE. In Fact the only way it works in IE is if I set required version to 0 (other wise it displays the flaschcontent)

    When I check my current Flash version (right click, about Flash) its shows 8,0,22,0
    I am using IE v6 latest updates
    and flashobject 3d (downloaded tonight)

    Any suggestions on what to look at? I’m sure it something I did

  14. As an update – I tried the example pages at http://blog.deconcept.com/flashobject/ and they said I needed to update as well. Not sure if they were supposed to not
    If I click the link to view my flash version, it says I do not have the flash plugin installed or javascript disabled (niether of which is true)

  15. Ahh damn, it is me, sorta, I am running JRE 1.6 (Beta) to geta round some other issues with 1.5
    I bet thats it!

  16. Allan: Your Java version shouldn’t make a difference. It’s most likely a corrupt install of your Flash player on IE.

    Try downloading the Adobe Flash Player uninstaller and run that, then reinstall the Flash player on IE again from their website.

    To find the uninstaller, search google for “flash player uninstaller”.

  17. There seems to be quite a few instances of broken Player installations in IE. I’ve had it reported on a number of client sites when we implemented version detection via FO (not putting any blame on FO here). The same people reporting no flash content had the same issues with sites like youtube, etc. Showing debug info would reveal the “can’t create object” error.

    Would it be possible to include an option to show the Flash content anyway if the player was not detected at all? Particularly in IE. That is, if the version was detected but was too low, show the alternate content, but if no flash found at all, show the tags and let the browser’s plugin support figure it out.

    If we could optionally “show flash anyway” if the new ActiveXObject() lines fail it might cater for those broken installs somewhat. Not an ideal solution, but the alternative is to try and explain why your visitors needs to download and run this player uninstaller even though flash movies are playing elsewhere.

  18. I too have observed a problem in IE. I was running Flash Player 8.5 beta and had problems displaying Flash content in IE 6.0.2900.
    Firefox with Flash Player 8.5 displayed everything fine. Strangely enough the ‘normal’ way of embedding Flash didn’t work either… I reverted to Player 8 and now both Flash pieces display fine.

    There’s obviously a problem with Player 8.5 in IE here…

  19. Gwilym: I’m not really a fan of the plugin finders in most browsers. The one in Firefox is pretty good, but the ActiveX install dialog in IE usually just scares people these days because they think you are trying to install spyware. I much prefer to send people to Adobe to get the plugins or use the ExpressInstall to upgrade them.

    I don’t think there are as many ‘corrupt’ installs as you think – and there is always the ‘bypass detection’ link that is built into FlashObject for those users who know they have Flash but there’s something wrong with it.

  20. Anybody had any issues launching Captivate movies using FlashObject? In this situation, there is a “launch” Flash that loads first with a wrapper, then subsequent Flash animations launch after that. The launch flash will work, but not the subsequent Flash.

  21. Well keep in mind the 8.5 player is still in beta, so one might expect to see a few small issues with it. If you can narrow down exactly what is happening, it might be smart to let Adobe know about it so they can fix it before the final version is released.

    Mike: I’ve never used Captivate with FlashObject, and I’m not sure if anyone else has. Try joining the mailing list and posting some links so we can all take a look at it and see if we can figure it out.

  22. Maybe I missed it, but the comment by Brandon Mathis seemed to go unanswered and im having the same issue. I uninstalled flash player and now im getting this error message:

    Unable to load plug-in.

    The page “FlashObject embed by Geoff Stearns (basic) @ deconcept” attemted to load an Internet plug-in named “Shockwave Flash”, but the plug-in failed to load successfully.

    I have this problem on Safari. With Firefox, i just get a blank space where the alternate content should be. Should’nt the alternate content be displayed if FO can’t find flash plugin? I hope this is me doing something wrong because this code would make my life a little easier.. =)

  23. If you don’thave the plugin installed, you should see the alternate content. If you are seeing the alternate content, it could be one of these reasons:

    1) You didn’t really uninstall the plugin, but just disabled it in Safari preferences. While one would think that this *should* work, Safari still reports that Flash is installed, but it just doesn’t play anything.

    2) You are clicking ont he ‘bypass detection’ link on my example page – this will always skip the plugin detection and try to embed the Flash movie.

  24. Hi Geoff, will the new internet explorer object and embed tags issue affect your script?

  25. The problem was indeed that the plug-in was not completely uninstalled. The uninstaller leaves the following file: Flash Player Enabler.Plugin” from the “comp/library/internet plug-ins” folder. After taking that file out, FO works like a charm.


  26. Just wanted to share a Flash HTML Template I put together that has worked for me when publishing within Flash directly to the FlashObject format. Saves a lot of time recoding from the Default publishing template.

    Take this template and save it to a file called FlashObject.html in your Macromedia Flash 8/First Run/HTML/ folder. Hopefully the formatting will stay intact enough to make sense:


    Display Macromedia Flash Movie in HTML using FlashObject.

    <!– Flash Content –>
    <script type=”text/javascript” src=”flashobject.js”></script>
    <div id=”$TI”>$TI</div>
    <script type=”text/javascript”>
    var fo = new FlashObject(“$TI.swf”, “$TI”, “$WI”, “$HE”, “$FV,$JR,$NR,0”, “$BG”, true);
    <!– End Flash Content –>


    Hope it helps!

  27. I think using $MO instead of "$TI.swf" might work better, and for the version, you’ll want to use dots (.) instead of commas (,).

    And your example has the ExpressInstall option turned on, so if you aren’t using that, change that last ‘true’ to ‘false’.

    Other than that it looks pretty good!

  28. flashobject is such a GREAT tool. Life in Flash-ville is once again lovely!
    A quick question… I’m using the CMX Dreamweaver extension that uses flashobject to insert Flash movies now. Can I simply rename the V1.3 flashobject_source.js to flashobject.js and let ‘er rip? Or is there a more elegant way to use the DW extension and still use the latest version of flashobject?

  29. It should just work if you download the latest zip file and replace your flashobject.js with the one in the zip. The source isn’t meant to be used, it’s just there to make reading the code easier.

    I use dojo shrinksafe to shrink it down before I distribute it.

  30. I had tried doing just what you suggest, Geoff, and it worked. I appreciate your feedback, though. Now I feel good knowing that it should work in most circumstances and not just in my limited test.
    Thanks. Again… what a great tool!

  31. Hello,

    just found out bout the patch ms released for IE. So i quickly found this fix.
    i just used the flash object script in a 100+ client page and it works fine in IE and firefox.
    now i used flash v7 , so is the default of the script check for player 8 and if so will it display my flash for the users if they just got flash player 7 or does it tell them to update to flash player 8?

    also what are all the little updates to FO , must we update each time because to go back and change the code in the html would be a huge hassle.

    also will there be a dreamweaver update to fix this new prob with IE?

    thanks and great script :)

  32. Hello,

    Ive been using flashobject to get around the microsoft browser changes and found it works great. The only problem Im having is using it for sites with a number of flash movies all on the same page. In these cases flashobject works exactly as it should, but I really dont want to have a number of alternate content messages on the same page all telling the user to get the plugin as it just looks messy. Is there any way I can get flashobject to redirect the user to a totally different page with an alert message instead?

  33. chris: I updated FlashObject whenever I find a bug in it, which is why there are sometimes small changes after a major release. I don’t change the API very often, and when I do it will be with a major version release (like 1.4 or 2.0 etc.). To update from the minor updates like 1.3c or 1.3d you can just replace the flashobject.js file and it should be fine. As for a dreamweaver update, who knows, but there is a dreamweaver extension you can download from communityMX (it’s linked on the FlashObject page)

    Rich: yes, you can redirect users if you like by using the fo.setAttribute('redirect', 'upgradepage.html'); attribute. I believe there is an example of this on the FlashObject page.

  34. Thanks geoff,

    I misunderstood what the redirect attribute did initially. Working exactly as I wanted now. Fantastic!


  35. Seems like I spoke too soon, it looked like it was working BUT …

    If I use the ‘redirectUrl’ attribute it now redirects the user to my upgradepage even it they have the plugin installed.

    I removed the flash plugin with the macromedia plugin removal tool, and was directed to my upgrade page as I wanted, I went ahead and installed the plugin then went back to the original page and still was directed to the upgrade page. Checked another site with flash content and the plugin definitely installed properly.

    Any suggestions would be apreciated.



  36. You should post stuff like this to the FlashObject mailing list – you’ll probably get faster reponses.

    In fact, I’m going to close the comments ont his post – if anyone else has comments about this or has questions or needs tech support for FlashObject, please direct them to the FlashObject mailing list. You need to subscribe to the list before sending mail to it.

Comments are closed.