|
|||
|
Is there an FFish mechanism to get the application version? (ie the version number as it appears in the About box)
Also according to Help, the FlashPlayer.getMovieInfo(movie) method returns an object with several properties, one of which is supposed to be "version". I am finding this property is "undefined". Do I need to set a version property in the swf file? If so, how? Thanks |
|
|||
|
To get the version of an application, please use the Shell.getFileVersionInfo method, as shown in the following code:
Code:
var x = Shell.getFileVersionInfo(
"c:\\WINNT\\system32\\Macromed\\Flash\\flash.ocx");
trace("Comments: " + x.comments);
trace("CompanyName: " + x.companyName);
trace("FileDescription: " + x.fileDescription);
trace("FileVersion: " + x.fileVersion);
trace("InternalName: " + x.internalName);
trace("LegalCopyright: " + x.legalCopyright);
trace("LegalTrademarks: " + x.legalTrademarks);
trace("OriginalFilename: " + x.originalFilename);
trace("PrivateBuild: " + x.privateBuild);
trace("ProductName: " + x.productName);
trace("ProductVersion: " + x.productVersion);
trace("SpecialBuild: " + x.specialBuild);
|
|
|||
|
Thanks for the reply. My question is how to get the version of my _own_ application created with SWFKit. ie the field that's entered in the Application definition - Information tab (which is the same information as displayed in the About box).
I see that I could get it with the Shell.getFileVersionInfo method if I knew the name and location of my compiled application. So how does a program get it's _own_ program name in FFish Script? |
|
|||
|
Sorry - now I have a further problem/bug? related to this.
There seems to be something "non-standard" about the property values of the getFileVersionInfo object. If I take from your example var x Shell.getFileVersionInfo("c:\\Windows\\system32\\M acromed\\Flash\\flash.ocx"); trace("CompanyName: " + x.companyName); >>CompanyName: testMacromedia, Inc. as expected. But if I try to manipulate that string by standard methods eg trace("CompanyName: " + "string added to start " + x.companyName + " string added to end"); >>CompanyName: string added to start Macromedia, Inc. ie the string added to the end is missing I suspect that the property values being returned by getFileVersionInfo are/aren't null terminated or whatever FFish Script requires. Help/fix will be appreciated. Thanks. |
|
|||
|
Yes, the "companyName" property contains an extra null character, but ffish script strings are not null terminated. Please apply the following patch to fix the problem:
http://www.swfkit.com/download/swfkit/propatch.zip To apply the patch, please extract the files into "c:\program files\swfkit pro 3\data" and replace the old files. Really sorry for the inconvenience. |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|