What the hell am I doing?

It’s been a while since I gave an update on what I’ve been up to lately, so here goes:

About 5 months ago I left The Chopping Block and started as a Senior Software Developer at Schematic. I’ve been working on a few really cool projects, including some work on Vongo, and a Windows Media Center site for GameTap. There’s a ton of other awesome projects in the works that we’ll be launching soon, so watch this space. Also, we’re always looking for good AS2.0 developers, so if you or someone you know is looking for work, or even just more fun work, drop us a line.

I’ve also started teaching a class on XHTML and Flash at The Cooper Union, which I’m very excited about.

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.