Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-31-2005, 07:54 PM
Member
 
Join Date: May 2004
Posts: 78
Default Detecting installed version of Flash

My program that uses SWFKit Pro requires Flash 7 to be installed. Thus I select this option within the SWFKit settings.

However, what happens if the user doesn't have the Flash 7 player installed? From the feedback I've had so far, it seems that users just experience error messages.

In my actual Flash file I've got a version detector as the first actionscript, but I think the SWFKit settings override this.

This is the code I've got:
Code:
playerVersion = System.capabilities.version
thisVer = playerVersion.split(",");
 //get rid of the gunk before the major player version number
 //eg "WIN 6" etc - the first entry of the array will old OS information
 thisVerSpaceNum = thisVer[0].indexOf(" ");
 //finally, a major version number (eg 6)
 flashVersion = Number(thisVer[0].substr(thisVerSpaceNum));

if (flashVersion < 7) {gotoAndStop("upgrade")} else {flashDetected = "Flash Player "+ flashVersion + " successfully detected"};
Is there a way my SWFKit produced program can check the version of the Flash player and then give the user an error message telling them to install the latest version? I assumed this would happen, but it doesn't seem too.

__________________
:)
Reply With Quote
  #2 (permalink)  
Old 01-09-2006, 10:51 PM
Member
 
Join Date: May 2004
Posts: 78
Default Re:Detecting installed version of Flash

Any ideas on this - my application is 'good to go' apart from this limitation! :-[
__________________
:)
Reply With Quote
  #3 (permalink)  
Old 01-10-2006, 06:46 AM
Senior Member
 
Join Date: Feb 2003
Posts: 212
Default Re:Detecting installed version of Flash

It's a bit of a nasty way, but if it's urgent: this is what you can do
Integrate a browser object that loads a htmlpage with a detectionscript.
In this way you can direct the users to the macromedia website as well
Reply With Quote
  #4 (permalink)  
Old 01-10-2006, 01:50 PM
Member
 
Join Date: May 2003
Posts: 35
Default Re:Detecting installed version of Flash

My understanding is if the Standalone checkbox is checked in the Output Detail interface the selected player is bundled with the EXE thus no seed to have it install on the users computer.
Reply With Quote
  #5 (permalink)  
Old 01-10-2006, 05:20 PM
Member
 
Join Date: May 2004
Posts: 78
Default Re:Detecting installed version of Flash

Thanks for the ideas. I'll have a think. I did previously believe that selecting a player from within SWFKit bundled that version, but I don't think this does happen - when I've got others to beta test the application it has fallen over if they don't have the relevant Flash player installed.

I think I'll just release it anyway - with a requirement that the user has Flash 7 installed.
__________________
:)
Reply With Quote
  #6 (permalink)  
Old 01-10-2006, 07:17 PM
Member
 
Join Date: May 2003
Posts: 35
Default Re:Detecting installed version of Flash

I did few project with swfkit and the player does get bundled when the standalone option is selected.

Selecting a player version is not enough.

Compile it with and without the standalone option and check the EXE file size each time. You'll see that it closely correspond to the player file size the same way when you publish a SWF or an EXE from Flash.
Reply With Quote
  #7 (permalink)  
Old 01-13-2006, 04:21 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:Detecting installed version of Flash

If the standalone option is checked, the produced exe program will always use the bundled flash player.

To get the version of the installed flash player, please try the following code
Code:
function getActiveXPathName(progID)
{
var rk = new RegKey('HKCR\\' + progID + '\\CLSID');
var clsid = rk.getValue().data;
rk = new RegKey('HKCR\\CLSID\\' + clsid + '\\InprocServer32');
return rk.getValue().data; 
}

var flashPlayer = getActiveXPathName('shockwaveflash.shockwaveflash');
var vi = Shell.getFileVersionInfo(flashPlayer);
trace(vi.productVersion);
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 02:09 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.