I recently came across a project where I needed to check for flash support in several browsers such as IE7, IE8 yet not make it crash for rest of the browsers. I came across two solutions that seemed to work.

The first one is a great library that that gives you bunch of additional information about the flash player such the version of flash installed, etc.. Its called SWFObject and here is the link for it.

Second option is just a few liners detection. The first part basically checks for IE browsers and the second part is for the rest of the old browsers.

var hasFlash = function () {
    var hasFlash = false;
    try {
        var ao = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
        if (ao) {
            hasFlash = !hasFlash;
        }
    } catch (e) {
        if (navigator.mimeTypes
            && navigator.mimeTypes['application/x-shockwave-flash'] != undefined
            && navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin) {
            hasFlash = !hasFlash;
        }
    }
    return hasFlash;
};

Hope it helps.