Activating Flex Automation Libraries - apache-flex

To "turn on" or "activate" the automation libraries for a SWF, a valid Flash Builder Pro license key needs to be compiled into the SWF. If you don't compile your SWF with a valid FB Pro license, you'll end up seeing a "License not present. With the trial version only limited records are allowed" error:
Background: I have a licensed version of Flash Builder 4.5 and I'm using Flex SDK 4.1. Watch what happens in the following examples:
Example #1 - Building my project using a licensed version of Flash Builder 4.5 with 4.1 SDK (http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4) FAILS to "turn on" the automation libraries. See Test41 project.
Test41 project found here (view source enabled): http://www.flexdevelopers.com/examples/license/41/Test.html
Example #2 - Building my project using a licensed version of Flash Builder 4.5 with 4.5 SDK (comes preinstalled with Flash Builder 4.5) SUCCEEDS to "turn on" the automation libraries. See Test45 project.
Test45 project found here (view source enabled): http://www.flexdevelopers.com/examples/license/45/Test45.html
Two different results. Hmmm, maybe that has something to do with my REAL problem:
My REAL problem: My SWF is not being compiled directly by Flash Builder but rather by ANT using the MXMLC and COMPC compilers found in the 4.1 SDK. These compilers "read" the flex-config.xml file.
So, inside flex-config.xml I've added this:
<licenses>
<license>
<product>flashbuilder45</product>
<serial-number>xxxx-xxxx-xxxx-xxxx-xxxx-xxxx</serial-number> <!-- this is my 4.5 license key -->
</license>
</licenses>
That didn't work. So I tried the "derived" serial number as discussed here (search for the word "derived"): How to properly define the Flashbuilder 4.5 Premium license for a maven flexmojo based build?
<licenses>
<license>
<product>flashbuilder45</product>
<serial-number>xxxxxxxxxxxxxxxxxxxxxxxx</serial-number> <!-- "Derived" sn number found in license.properties file -->
</license>
</licenses>
That didn't work either.... My guess is that I'm using a 4.5 serial number against a 4.1 SDK...and that's no good.
Besides upgrading my SDK to 4.5, anyone have any ideas what I can do to "activate" my SWF to handle automation using a Flash Builder 4.5 license, ANT, the 4.1 SDK compilers and flex-config.xml?

Here's the answer:
I eluded to this in my question.
If you're using the Flex 4.1 SDK and you want to "activate" your SWF for automation, charting, etc. Then you have to do this:
Compile your SWF using a licensed version of Flash Builder 4 WITH a Flash Builder 4 license key
OR
Compile your SWF using ANT, MXMLC, COMPC, flex-config and add this to flex-config:
<licenses>
<license>
<product>flashbuilder4</product>
<serial-number>xxxx-xxxx-xxxx-xxxx-xxxx-xxxx</serial-number> <!-- this is a FB 4 license key -->
</license>
</licenses>
If you only have a FB 4.5 license key and you're using SDK 4.1, I guess you have no choice but to upgrade to SDK 4.5+.

Related

Packaging a captive runtime bundle for desktop computers from ADT command line

I friends,
i have less this tutorial packaging a captive runtime bundle for desktop computers which is a guide to create an installation package includes the AIR runtime.
I have develop AIR Desktop Application with Flash Builder 4.5 and i have used SDK version 4.5.0 and relative ADT version for packaging the application. I followed the tutorial of adobe (link above) but does not recognize the command -target bundle. Why? I replaced sdk 3.6.0 is the adt command works with the option but can not create the package because I use only the components present in version 4.5.0 of the SDK. How do I create the package with the same features of the guide??
The Captive Runtime option was not introduced until Flash Builder 4.6; so you can't do it using the Flash Builder 4.5.

Adobe AIR - Captive runtime

I'm using Adobe Flash CS5 with Adobe Air 2.5 to build an air app.
Is there a way to make use of the Air 3 captive runtime feature? Do I need additional software to publish the Air app with the captive runtime?
Captive Runtime is not yet integrated into the Flash Pro IDE. You'll have to package your app using the command line tools available in the free AIR SDK.
Some more info is here; basically when you compile your app be sure to specify the target parameter. To create an Android APK, you would use this:
-target apk-captive-runtime
More info on options is here

How to know exact flex sdk version from existing project files?

I received an inheritance old flex project. I've never worked with Flex. I installed the latest Flash Builder and I need to know the exact version of used Flex SDK. Is there any way to know used SDK version from project files?
Thanks in advance!
Is it's an AIR project, you can open up the -app.xml, based on which the project is built and check out the application namespace
<application xmlns="http://ns.adobe.com/air/application/1.0">
Represents AIR 1.0 (Flex SDK 3.2)
<application xmlns="http://ns.adobe.com/air/application/2.0">
Represents an AIR 2.0 Project (SDK 4.0 ?)
If it's a WebProject (that runs on FlashPlayer), check the .actionScriptProperties file in your project. In one of my project files, under the compiler tag, I can find a property called flexSDK="Flex 3.2". Not sure if this will be there for every project, as i could not find the same property for other projects.
One more thing you can check is the target FlashPlayer version you are going to compile against. Check the htmlPlayerVersion property of the compiler tag in your .actionScriptProperties file.
If the htmlPlayerVersion is greater than or equal to 10.0.0, you should use Flex SDK 3.2 or above.
Right-click on project folder in flash builder, then property, then flex compilator.

How to make a FlexBean plugin cooperate with maven flex project

I have a flex maven project written by externel company that I need to modify. I dont have a Flash Builder licence yet (it takes forever to buy anythng in my company) .
I installed Netbeans 6.5 and FlexBean but when i opended flex maven project the action script code is ont recognized as action script by the IDE. Ho to make it "flex aware" ?
nb 6.5 is fairly old. does the flexbean integration require such old version?
some 3rd party tools might not integrate with the maven project type in netbeans and only do so with the default ant based projects.. if that's the case I suggest filing an issue against flexbean

Does Flash Builder 4 now use AIR 2?

I just got CS5 master suite which includes Flash Builder 4 and Flash CS5 Pro.
When I create a new AIR app in CS5 pro it says "AIR 2" but when I create a new AIR project in Flash Builder I do not see anything indicating that it is AIR 2 or 1.5?
Is there a way to tell which AIR runtime it is using?
I think you'll have to download the SDK and st it up yourself; but Flash Builder should work fine:
http://labs.adobe.com/wiki/index.php/AIR_2:Release_Notes
How to overlay the Adobe AIR SDK for use with the Flex SDK
Copy the contents an existing Flex SDK folder to a new folder. For
example, in Flex Builder, copy the
following folder located at:
* Windows: c:\Program Files\Adobe\Flex Builder 3\sdks\3.2.0
* Mac OS: /Applications/Adobe Flex Builder
3/sdks/3.2.0
Download the appropriate AIR SDK file for your operating system and
save it to the root folder of the Flex
SDK.
* Windows: AIR20_win_sdk_XXXXXX.zip
* Mac OS: AIR20_mac_sdk_XXXXXX.tbz2
Extract the contents of the AIR SDK archive and overwrite the existing
SDK files in the copied folder.
* Windows: Right-click on the ZIP file and select "Extract All"
or use the decompression tool of your
choice.
* Mac OS: In Terminal, cd to the root folder of the Flex SDK and
run this command:
* tar jxvf AIR20_mac_sdk_XXXXXX.tbz2
If you have trouble overwriting files due to file
permissions, try this command
sudo tar jxvf AIR20_mac_sdk_XXXXXX.tbz2
In Flex or Flash Builder, open the Properties dialog and choose the
Flex Compiler page
Click the Configure Flex SDKs... link
Add the combined Flex and AIR 2 SDK folder created above
Use this SDK for any projects accessing AIR 2 APIs.
To update this for the production release; go downlod your preferred version of the Flex SDK at http://opensource.adobe.com/wiki/display/flexsdk/Downloads and download the AIR 2 SDK at http://www.adobe.com/cfusion/entitlement/index.cfm?e=airsdk .
Overlay the two using the instructions above (1-3); then configure the new SDK in Flash Builder (also using the instructions above (4-7).
Update: Since my original post of this; Flex 4.1 SDK was released which includes the relevant AIR 2 bits. You can get it here
The fastest way to use AIR 2 is to download a new version of the Flex framework. I've downloaded version 4.1.0.16076 from here and it comes with AIR 2 already installed.
Today Adobe release the stable version of AIR 2 SDK so probably they come up with a new stable release of the Flex SDK.

Resources