FlashObject mailing list

Please note that the FlashObject mailing list has been retired, and the SWFObject mailing list has replaced it.

FlashObject has been gaining a lot more popularity lately, and with it the number of requests for help has gone up steadily (what, my tutorials aren’t good enough? ;)). So I created a mailing list just for FlashObject related questions!

Sign up now by going here and filling out the form. (And make sure you watch your spam folder for the confirmation e-mail!)

Once you are signed up, send any problems or issues you might be having (it’s ALWAYS better if you include code samples or a link to the page you are having issues with) or even new feature requests.

Enjoy!

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.

GetVariable/SetVariable crashes Internet Explorer with Flash Player 6

A few weeks ago a reader asked me if I knew why FlashObject would be crashing some of his user’s browsers. After a bit of investigation, it turns out that the new Flash version checking routine was crashing the Flash player, but only certain versions and only in Internet Explorer on PC.

Here’s what the crash looks like:
Flash Player crash

After some investigation, it turns out that the problem is in a few specific versions of Flash Player 6. If you are running Internet Explorer and Flash Player version 6.0.21, 6.0.23, or 6.0.29, the browser will crash if you call GetVariable or SetVariable (or a number of other methods that are built into the Flash Player plugin).

Since I don’t think that crashing your user’s browser is very acceptable, I’ve made a few changes to FlashObject. The detection script is a bit smarter now, and it will only try to do a minor version lookup (and possibly crash the user’s browser) if it really needs to. Most users of FlashObject probably aren’t using some of the more advanced features like ExpressInstall or doing minor version checks for specific Flash 6 versions. I’m sure they are out there, but the majority probably just checks for version 6 or 7 and are done with it.

Let me also say that I don’t think this is a major bug. Users who have these specific player versions AND use Internet Explorer are probably an extremely small number, but I also think it’s very important that developers know if their website might cause a user’s browser to crash.

This problem will also show up in other Flash detection scripts out there, including Macromedia[Adobe]’s own Flash Player Detection Kit, and Bobby van der Sluis’ UFO script.

Because of this issue, I’ve made some changes to the FlashObject script. It will cause fewer crashes by avoiding the minor and revision version checking unless it’s absolutely necessary.

However, there are still a few conditions where FlashObject may cause a user’s browser to crash:
These assume that the user has one of the problematic Flash Plugins installed on their system and is using Internet Explorer – all other Flash versions and Browser combinations should be 100% safe.

  • When your site uses the ExpressInstall feature. Because the first Flash version to use ExpressInstall is version 6.0.65 we need to see if their Plugin can support it. Since we check and see that they have player version 6 installed, FlashObject will do the check to see what revision they have, which will crash the browser (again, only if they have one of the problem players – if they have version 6.0.65, the upgrade will start and everything will be just fine)
  • If you specify that your movie needs a plugin version higher than 6, but less than 7 (like 6.0.65), then the player will do the minor version lookup, and possibly crash the browser if they have one of the problem plugins.
  • Using the getPlayerVersion() function alone. You can see an example of this on my flashversion.html page. I use the function to simply check what version is installed. Because it’s an extensive check it will do the full version lookup and will crash the browser if the user has one of the problem player versions installed.

I’ll be releasing the new version of FlashObject with these fixes in the next few days. Or, if you are interested in checking it out now, drop me an e-mail and I’ll send you an advance copy to test out.

UPDATE: The new version of FlashObject is out (v. 1.3) – go get it, it fixes this problem in most cases, but it wasn’t possible to eliminate the issue entirely when using ExpressInstall or when specifically checking for the minor/revision numbers.

Internet Explorer Eolas changes and the Flash plugin

Microsoft recently announced (again) that they will be changing the way Internet Explorer handles plugins (more info here).

So how does all of this affect you being a web developer?

Basically, the functionality changes work like this:

When using an applet, object, or embed tag to insert a plugin into an HTML document, that plugin will not allow user interaction until the user clicks on it. Microsoft calls this process “Activating an ActiveX Control’s Interface.

In the case of the Flash plugin, it means that your Flash movies will not work until a user ‘activates’ it first by clicking on it. The details are still a bit fuzzy, and I can’t find a developer preview of IE 6 or IE 7 that include this new functionality to test this new functionality (If you find one, please let me know) (see below). This is a slight improvement over the previous ‘fix’ which was a small dialog prompt for each ActiveX control on a page. Now you just have to click on each control to activate it (if you want to interact with it).

Microsoft says “We believe over the next six months, most customers will be running copies of Internet Explorer with this behavior.” The changes will be rolled into IE 6 through security updates to Windows, and included in IE 7.

But that’s so stupid! How do I fix it?

Thankfully, Micosoft offers a fairly easy way around all this nonsense: Embed your Flash movies using Javascript. Head over to the FlashObject page* and start using it (you should be using it anyway, everyone else is!). You may also want to retrofit your old websites that don’t use Javascript since this change will affect every website. If you are using quicktime, you can always use my QTObject script which works the same way that FlashObject does, but for the Quicktime plugin.

UPDATE (1-22-2006): Apple has recently released a new script that is similar to my QTObject script to prepare people for the upcoming IE changes.

* UPDATE (2-21-2006): After testing with a patch (search the page for ‘English’ to find the download link) that Microsoft released recently released (and with some help from Dan Freeman) it turns out that you must have ‘Disable Script Debugging’ checked in the Advanced options of IE in order for the controls to be activated as they are embedded. If you have Script debugging on (it’s off by default) then you will still need to activate each ActiveX control on the page.

Also: Macromeida/Adobe has a new Active Content Developer Center.

UPDATE (3-1-2006): Microsoft has released the update. There’s more information and a nice list of possible issues you might have after installing the update on this Microsoft KB article page.

UPDATE (3-24-2006): Looks like Microsoft is set to roll out the Eolas changes to everyone around April 11th. Get ready.

UPDATE (3-29-2006) Microsoft announced their future plans for releasing the patch to customers today.

UPDATE (5-9-2006): Adobe posted what looks like a very rare edge case regarding an out of date jscript.dll causing users to always activate ActiveX controls, even if they are embedded using Javascript in the proper way.