The new Macromedia Flash Player detection kit

With the announcement of Flash 8 today, Macromedia also quietly pushed out their new detection kit. The detection kit has has been around for the last few versions of Flash, and usually changes with each version to include whatever the latest trends in Flash detection are.

It’s no wonder then, that the latest version uses Javascript as the suggested detection method. Unfortuntely, it’s not perfect. While it’s a good first try, it is greatly lacking in a few basic needs of most web developers. Here’s the issues I have with it:

  • Inline Javascript code (and lots of it) – Who wants to copy a bunch of Javascript and VBscript onto every single page that uses Flash? While it might be possible to move the Javascript into an external file, you would still have a small amount of VBScript on each page (or another external file to include). I’m not sure why they decided to leave in the VBScript when there are other reliable ways to create and test for ActiveX objects. Also: what happens if you need to upgrade the Javascript for some reason? While the code should be very futureproof, you never know when a bug might pop up, and you’ll be stuck editing all of your HTML files that have Flash movies included in them.
  • Tough to modify the code – It suffers from the same drawbacks as most Javascript embed techniques – placing tons of Javascript document.write() calls and writing out your object or embed tags to the page. This is a hassle to edit if you need to make changes, and makes it very tough for designers who don’t know Javascript to go in and modify attributes.
  • It’s not valid HTML or XHTML – Valid XHTML documents aren’t for everyone, but when you have clients specifically asking for them it’s nice to be able to deliver. The new detection doesn’t even come close to validating.

If you want to compare the new Macromedia detection to my FlashObject script, check out this new article that shows how to use it:

Best Practices for Flash Player Detection

Then compare the steps needed to get that working with using FlashObject:

  1. Include single .js file.
  2. Add a few lines of code (see example of bare minimum).
  3. Sit back, relax.

I think the choice is clear.

Now when you downloaded the new detection kit you may have noticed another folder hiding out in there with the name of “Express Installation.” This is Macrmedia’s new way of upgrading your Flash player without the need to go to macromedia and download the new plugin. I’ll be writing up a new entry soon that gives some tips and best practices on using this method in the very near future.

21 thoughts on “The new Macromedia Flash Player detection kit

  1. I can definitely see your points, but please keep in mind that the new Flash 8 detection solution is being recommended because it works consistently across browsers on Windows and Mac. Every other detection method I tested worked incorrectly in at least 2-3 scenarios. If you have a sample page you can point me to, I’m happy to take a look. The “Best Practices” article is meant as a living document. It can be updated.

  2. So are you going to include ‘express installation’ functionality into FlashObject? I like the sound of a semi-automatic update for flash – too many not so web-savvy users don’t quite get what flash is let alone feel the need to update their player. I assume it works in a similar way to how the latest version of the Flash Player Beta installs, where you do everything through a flash interface and never have to leave the browser (although it does ask you to restart it also brings you back to the same page you were on) – it nice, especially since usually the firefox install require you to download an .exe and run it to install the player – I like where flash is going, I think back over all the projects I’ve done this year and almost wish I could do them again in flash 8, I probably would do it to if I was going to get paid again.

  3. @ Robert Hoekman, Jr

    I have used FlashObject and UFO and found that the detection methods in both work fine in Opera and Firefox and IE (Win and OSX), and Safari too – I haven’t yet discovered a problem with either detection method.

  4. Sorry to keep posting, just thought – maybe the flash detection fails in mobile devices or those using flash lite? I have never been able to test here, mostly because I have never been required to develop for mobile devices – but I guess it’s becoming ever popular now, anyone know of any stats or sites that keep track of mobile browsing developments?

  5. Robert,

    Did you do tests on FlashObject? Also new since you wrote the article is the UFO embed script, which I’m not a fan of because of the way it waits to load the content until the page is loaded, but I guess some people like the illusion of cleanliness it provides.

  6. Jon,

    I do plan on working in some sort of compatibility with the Express Install. I’m not quite sure if it will be built into the FlashObject script, or if I will end up just building a generic upgrade page that will handle upgrading the Flash plugin depending on the user’s installed OS/browser/Flash player.

  7. I don’t recall coming across flashObject when I was doing my research and testing, but perhaps I just missed it while shuffling through the overwhelming amount of information on the subject of detection. I am certainly interested in testing it out, but I may not get to it until next week.

    I notice that two of your points about why flashObject is better focus on the difficulty of implementing and modfying the Flash 8 detection scripts. I mean no offense whatsoever (seriously), but to this, I can only remind everyone that it is not our job to make our own lives easier; it is our job to make out users’ experiences better. The Flash 8 scripts work very well, so I’m more than happy to spend two extra minutes moving code from one file to another if it means my users will benefit. If flashObject works as well, under all the required circumstances, I’ll be happy to recommend it.

  8. Of course it’s our job to make our lives easier. If that wasn’t the case, we would all still be using Photoshop 3 and Flash 4. I still have nightmares of using the ‘slash colon’ syntax and that horrid.

    The trick here isn’t making something that works for everyone. Anyone can throw some Javascript together that will work for 99% of your users, and then provide safety nets for when the content needs to degrade. Once you get to that point (and I think all of these scripts provide perfectly acceptable user experiences) then it’s time to start thinking about the rest of the things involved.

    What about search engine indexing? My alternate content gets indexed just fine. User experience doens’t stop at your pages – you also need to consider what Google sees. Go search for “detecting flash player” and marvel at all the wasted space that could have been used to help people find your website. If your alternate content is tied up in Javascript (as it is with the Macromedia detection script), Google won’t index it.

  9. Robert please also keep in mind that we are also our users, i’m sure i get more frustrated than your average “mom user” when i see a detection method that doesn’t offer a “i know i have flash” link precisely because i KNOW I HAVE FLASH and i know how easy it is to detect the right way.
    Also, making our lives easier can only improve our code. Tweaking a few vars in a concise and standard way vs digging around in myriad doc write calls greatly reduces the likelihood of bugs, something most users enjoy.

  10. i went to a MM seminar this morning, and the speaker claimed that they had this brand-spankin’ new detection method that was awesome and easy to implement. Just check the “detect flash 8″ checkbox under HTML publish settings.

    When i did that and hit the html page, i got a blue page that said something like FLASH CONTENT GOES HERE – UPDATE THIS SENTENCE SO IT’S LESS UGLY. Then, apparently, there was a blue link in the same colour as the background that said “Get Flash.”

    The player did NOT update inside itself, as MM claimed this morning. Detection was NOT just as easy as checking a box, and beyond all that – as i write this, the Flash 8 player isn’t even available for download on the MM site. It seems to keep installing FP7 and happily chirp that i have the F8 player. What gives?

  11. Thank you Mr Sock, I’m glad I’m not the only one having trouble with the Flash 8 automatic upgrade.
    I’ve tried various approaches but on machines with Flash 7, nothing so far has managed to
    convince client browsers to upgrade automatically.

  12. I have been using the new Macromedia Detection Kit and I came a accross this problem:
    When using IE 6 and the flash player plug-in v6 r22 to r29. The detection code will crash the browser.
    Can anyone please confirm this?
    Looks like I will need to migrate to FlashObject now.

  13. You are right, it does crash the browser… Unfortunately FlashObject also suffers from the same problem – the issue is in the GetVersion call and only happens on Windows IE with Flash player 6.0.21 or .23 or .29 from what I can tell.

    I’ll be putting in some time to come up with a solution, but I’m not sure a good one will pop up. Those player versions have a *very* small install base, so it shouldn’t be much of an issue unless you have a unique user base that has those particular versions installed for some reason. Maybe a large corporate intranet or something like that.

    The older versions of FlashObject (pre 1.2) will not cause the crash, but then you lose the ExpressInstall functionality and the minor/revision detection.

  14. Not sure if this comment will get looked at since the last one is dated more than a month ago. Anyway, here goes:

    I have been stuggling to successfully implement Macromedia’s Detection Kit. When I say kit, I am actually referring to the “automated” version that can be published within Flash 8 Professional (same as the kit?). Anyway, after some simple tweeking of the script, I was able to provide alternative content in the event that JavaScript is turned off. However, the alternate contect in the event of an out of date or uninstalled player goes, trouble occurs. Since I know very little JavaScript, I cannot successfully implement an image display (with map) to show up. I have no idea how to write the following HTML code into the generated JavaScript:

    be a trivial question, but I have no idea how to get it “working” within the script itself. Any suggestions?

    FInally, I just wanted to point out that this JavaScript method (generated by Flash) does NOT work within Safari, Netscape, or IE under OSX Tiger. I uninstalled Flash 8 Player to test the script and was surprised to see an error generated by the browser but no JavaScript in action. At work today, on a PC, the script worked exactly as intended.

    Anyone else come across this problem on a Mac? Robert Hoekman, Jr. (see above) suggests this method works “across all browsers.”- I don’t see how though. Robert, even on your own site (linked from your tutorial on Macromedia’s site), the detection method fails for me- within OSX Tiger.

  15. … looks like the image tag above was deleted. Within the “alternateContect = ‘” should be “
    Flash Download

  16. I give up. But you get the idea- an image tag with map to allow the user to click and be directed to the Flash Player install page.

  17. I’m currently using FlashObject and it’s working awesome for me. I threw some code for express install on frame 1 of my flash file, but I have no way of testing if it’s working for me or not. How can I trick my system into thinking I don’t have Flash 8 installed, or uninstall 8 and install an older version (6 or 7). I can’t find downloads for the old install files either. Any ideas? How do you guys test Express Install?

    Thanks

  18. Adobe has an uninstaller for the Flash player, and you can get older versions here.

    Always run the uninstaller so it cleans out all the extra files and registry entries, then install the version you want afterwards. To test ExpressInstall, you can install any player from 6.0.65 and up.

  19. Is there anyway to get through this detection nightmare as a js clueless designer. everyone is pushing me towards the FDK. I tried it and it worked until I tried to “put my alt content here” as they said in verious training videos. I have no idea what “content” means as it relates to js and I just pased my alt page html into that area and that disabled my flash content. I would like to try your detector, but I have no idea how to do it based on the instructions listed on this site. Im sure that they were ment for developers and not designers. but even after MM left me out to dry, I feel like sort of a car designer who finished the entire car productions and now is told that he has to learn how to refine gas from crude oil in order to fill the tank.

    Is there any simple option out there for “designers” who are clueless on js and do not have the capacity nor the intrest to leasrn it?

Comments are closed.