how to detect flash using (

My problem is that I have flash on several of my pages and for broswers like firefox which are not able to display flash, I want to give a friendly message or a link to download the same.
how can I detct flash using code and display the message accordingly.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David H.H.LeeCommented:
Hi sjosh1,
You can refer Adobe Flash Player Detection Kit. Download the zip files for the integration that you need:

Use third party component to achieve the required:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sjosh1Author Commented:
Thanks for your suggestions.
Am actually working on the adobe detection kit javascript solution and it seems to work only if I can provide the exact version of the flash file which am unable to (as it was sourced from a 3rd party and is located at their website).
David H.H.LeeCommented:
Have you tried the solution that provided in folder - Client-Side Detection?
Please provide more details on your current script if need for further inspection.
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

sjosh1Author Commented:
yes I am using their client side detection script.
In the html provided, there's a funtion as follow in which we need to provide the value of the gloabal variable requiredMajorVersion. Correct me if I am wrong but I am assuming this requiredMajorVersion is the version in which the fash file was created?  :

<script language="JavaScript" type="text/javascript">

       // -----------------------------------------------------------------------------
       // Globals
       // Major version of Flash required
       var requiredMajorVersion = 8;
       // Minor version of Flash required
       var requiredMinorVersion = 0;
       // Minor version of Flash required
       var requiredRevision = 0;
       // -----------------------------------------------------------------------------
       // Version check based upon the values entered above in "Globals"
       var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);

       // Check to see if the version meets the requirements for playback
       if (hasReqestedVersion) {
           // if we've detected an acceptable version
           // embed the Flash Content SWF when all tests are passed
           "src", "example",
           "width", "400",
           "height", "200",
           "align", "middle",
           "id", "detectionExample",
           "quality", "high",
           "bgcolor", "#FFFFFF",
           "name", "detectionExample",
           "allowScriptAccess", "sameDomain",
           "type", "application/x-shockwave-flash",
           'codebase', '',
           "pluginspage", ""
           document.getElementById("flash").style.display = 'block';
           document.getElementById("noflash").style.display = 'none';

       } else {  // flash is too old or we can't detect the plugin
           /* var alternateContent = 'You are not able to view the flash file.<BR>'
           + 'This content requires the Adobe Flash Player. '
           + '<a href=>Get Flash</a>';
           document.write(alternateContent);  // insert non-flash content*/
           document.getElementById("flash").style.display = 'none';
           document.getElementById("noflash").style.display = 'block';

// -->

As you will notice, I have changed the function to suit my needs. If the flash test passes, I display the div containing flash, else the div containing alternate text.
sjosh1Author Commented:
Found the version. My code's working fine now though I need to do a lot of testing.
Thanks again.
sjosh1Author Commented:
Would you know of an alternative solution?
David H.H.LeeCommented:
Glad to hear the resolved.

>>an alternative solution?
You can just invoke this in client script as suggested in Adobe Flash Player Detection Kit. Do you have any obstacle to apply this on solution?Yet, it is depending your applicable flow in this case.
sjosh1Author Commented:
I didn't have any problems with it in my solution though just wanted to find out a server side solution for it in
David H.H.LeeCommented:
You can put all the detection code above into one client script function called - "loadFlashDetection()". Then, invoke this script in Page_Load event or your preferred server event as needed.
Sub Page_Load
  if not ispostback then
    RegisterStartupScript("loadFlash", "<script>loadFlashDetection();</" & "script>")
 end if
end sub
sjosh1Author Commented:
Thanks for that though I cannot put it in page load event because otherwise it does not recognize my page divs and keeps giving an error message like object not found for the divs and so I have to put it at the bottom of the page under the actual divs for each page.

Also, just to be very clear, with regards to script, I was actually referring to whether we have an equivalent in for the asp flash detection script (example: if isObject(createObject("shockwaveFlash.shockwaveFlash))
David H.H.LeeCommented:
>>Also, just to be very clear, with regards to script, I was actually referring to whether we have an equivalent in for the asp flash detection script (example: if isObject(createObject("shockwaveFlash.shockwaveFlash))
Perhaps you can use third party component like BrowserHawk (as suggested earlier). But, you may need to purchase some money for this commercial tool.
sjosh1Author Commented:
Thanks so much for all your help on this topic.
David H.H.LeeCommented:
You are welcome
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.