views:

87

answers:

1

I'm wondering wether there's a Javascript way to detect wether a user has any sort of flash blocking plugin installed so i can accommodate these users properly.

For example, I use 'click to flash', but sites that use SiFR to render text are littered with "click to flash" buttons, which is getting very annoying. I don't use SiFR in my designs for this reason. But if I could spot wether there's a flash blocking plugin installed, I would simply not call the SiFR function.

Any ideas?

+2  A: 

Take a look at http://www.adobe.com/support/flash/publishexport/scriptingwithflash/scriptingwithflash_03.html. You could call the following after the page has loaded.

var movie = window.document.movie;
try {
    //if the movie is blocked then PercentLoaded() should through an exception
    if (movie.PercentLoaded() > 0) {
        //Movie loaded or is loading
    }
}
catch (e) {
    //Movie is blocked
}
Nathan Villaescusa