Flash Builder 4.6 not compiling for Flash Player 10.2

apache-flexflashflash-builder

I am new to creating Flex applications and trying to target Flash Player 10.2 with my first. I have created it using Flash Builder 4.6 and compiled using the 4.5a SDK. I've also set the option to target 10.2.0 in the the Adobe Flash Player options. When I create the release build, there are no error and the resulting HTML file contains the following:

// For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. 
var swfVersionStr = "10.2.0";

However, if I try to visit the application in a browser with v10.2 of the plug-in it says 11.1 is needed. I also have the same problem with a simple Flash CS5 animation that only uses stop() and getURL(). The animation works but doesn't stop.

Thanks for the detailed reply wxvxw I've now taken a screenshot of my compiler options, but can't show it here as I'm a new user, but the URL is…

https://lh6.googleusercontent.com/-3xEJ0RTFG-8/Tw9rJt2UloI/AAAAAAAAARs/Ruu9Em66fgo/s800/fboptions.PNG

I've tried -target-player 10.2.0 (previously) and now -target-player 10.2 but neither worked. I've also located the playerglobal.swc in the following directory:
C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.6\sdks\4.5.0\frameworks\libs\player\10.2

Thanks. Dan.

Best Answer

IIRC, the SDK that comes with FB 4.6 only has FP 10.1 and FP 10.3 libraries. So, in order to compile for FP 10.2 you will have to find the corresponding playerglobal.swc (maybe look up older SDK releases?).

Now, regarding your settings: the version of the player you want to compile for is set in the compiler arguments, there are multiple ways to do that, but it looks like you've done something else instead :) In order to compile for certain player version, the compiler needs to know how that version of the player behaved, that is it needs a description of all the built-in functions the player had at that time. playerglobal.swc provides the definitions for those functions (search your SDK folder for the possible location). -target-player is the compiler argument that you need. One way to tell the compiler what player to target is to open the project settings and in the additional compiler arguments line type something like -target-player 10.2. Note that you might not have the appropriate playerglobal.swc. The compiler error in such case will roughly point you to the directory where this library is to be found.

Flash Builder and SDK had never had 11+ player as a requirement, (more yet, the SDK has not even been tested against this version), so the requirement is unrelated (did you use Google Chrome for testing, maybe you need to check about:plugins page?). What you did set is some variable that is supposed to tell the JavaScript script that is used to embed the SWF, what minimum version of the player is required to run the SWF, this has no effect on the SWF itself, it's only for user's information (you should set it in such a way, that in case users have older version of player they will be told to upgrade). If you used FB's code generation, or the Ant task provided by Adobe to generate the HTML page containing SWF, then this variable would be set to the same version you used to compile your SWF to, otherwise it's up to you to adjust it to the proper value.

Related Topic