2 Replies Latest reply on Jun 30, 2009 7:17 AM by DM277

    How to Check Flash Player Before i run My application

    Fis Forums Level 1



         I have developed a application using flex as my first page of application,

      Problem is when i start my application on some other newly installed system with out Flash player plugin it show's alert to save/cancel


      I need to rectify that by informing User that Flash player was not installed.how to check it out from Flex Codes itself


      Thanking you,


      With Regards,



      Software Developer,

      First Internet Systems Pvt Ltd.,


        • 1. Re: How to Check Flash Player Before i run My application

          it's best to use swfobject: http://code.google.com/p/swfobject/

          projects in Flash Builder 4 are compiled with this automatically

          • 2. Re: How to Check Flash Player Before i run My application



            Include the following javascript code in the html fileof the flex application


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

            // Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
            var hasProductInstall = DetectFlashVer(6, 0, 65);

            // Version check based upon the values defined in globals
            var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);

            // Check to see if a player with Flash Product Install is available and the version does not meet the requirements for playback
            if ( hasProductInstall && !hasRequestedVersion ) {
                 // MMdoctitle is the stored document.title value used by the installation process to close the window that started the process
                 // This is necessary in order to close browser windows that are still utilizing the older version of the player after installation has completed
                 // Location visited after installation is complete if installation is required
                 var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
                 var MMredirectURL = window.location;
                document.title = document.title.slice(0, 47) + " - Flash Player Installation";
                var MMdoctitle = document.title;

                      "src", "playerProductInstall",
                      "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
                      "width", "100%",
                      "height", "100%",
                      "align", "middle",
                      "id", "index",
                      "quality", "high",
                      "bgcolor", "#eeeeee",
                      "name", "index",
                      "type", "application/x-shockwave-flash",
                      "pluginspage", "http://www.adobe.com/go/getflashplayer"
            } else if (hasRequestedVersion) {

                 // if we've detected an acceptable version
                 // embed the Flash Content SWF when all tests are passed
              } else {  // flash is too old or we can't detect the plugin
                var alternateContent = 'Alternate HTML content should be placed here. '
                   + 'This content requires the Adobe Flash Player. '
                    + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
                document.write(alternateContent);  // insert non-flash content

            Hope this helps you