Posts Tagged ‘flash builder 4’

Multiple Workspaces with Flash Builder 4

Wednesday, June 1st, 2011

A lot of the projects and project revisions I work with contain projects of the same name. It’s handy to have multiple workspaces, so that multiple instances of FB4 can be open at the same time (saves you having to remove projects from the IDE to load a diff project).

1. Windows>Preferences>General>Startup & Shutdown>Workspaces

Tick Prompt for Workspace

2. Handier if in My Documents, so created a FB4 folder and on startup of FB4 browsed to this location.

3. Do this for each workspace (basically just a folder) you want to create.

4. In your Flash Builder install folder, open FlashBuilder.ini and add an argument:                -showlocation on the line after en_us. This will add the workspace to the title of FB4 when you open it.

To use the same settings for multiple workspaces copy the settings folder of your original workspace folder: \.metadata\.plugins\org.eclipse.core.runtime\.settings, and paste to your new workspace metadata.

Flash Builder 4, Flex 3 SDK: Export Release Build Error

Wednesday, January 19th, 2011

Had to import some Flex 3 projects to Flash Builder 4 (using it in work now), and everything seemed to go ok. Had copied the Flex 3 SDK from FB3 folder, set it as the default in FB4. Cleaned and ran the project (including RSL library projects) all ok. Then went to Export Release Build and got:

Error – One or more errors were found while trying to build the release version. Unable to export.

The Log file (thanks to doc_180 on Stackoverflow) showed the cause as:

java.lang.NoClassDefFoundError: flex2/tool/oem/OEMException$CircularLibraryDependencyException

Log file can be found at the equivalent of C:\Documents and Settings\bbishop\Adobe Flash Builder 4\.metadata

Turns out that 3 files are required by Flex 3 SDK to export a release build in Flash Builder 4 where RSL’s (Library projects) are used, and these are missing. Luckily you can copy these from the Flex 4 SDK.

Let me shout out a thanks to eggsWurzel for his Adobe Forum Post with the solution. Bug is on the Adobe Jira Bug Database

How to implement the solution

  1. Get a copy of flex-compiler-oem.jar from C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.1.0\lib
  2. Extract flex-compiler-oem.jar (using Winzip/7 Zip/Winrar), and go to the flex2\tools\oem folder in the extracted files
  3. Look for the following 3 files:
    1. OEMException$CircularLibraryDependencyException.class
    2. OEMException.class
    3. OEMException_en.properties.
  4. Open Winrar (doesnt work for me with Winzip or 7 Zip), and in the AddressBar browse to the flex-compiler-oem.jar file in the Flex 3 SDK – should beequivalent to C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\3.2.0\lib (make a copy first just in case), and open \flex2\tools\oem
  5. Drag the 3 OEM files over to the \flex2\tools\oem folder in Winrar

That’s it! Close Winrar, and restart Flash Builder 4, should Export a release build ok now:) Nice one.

Note: if using RSL’s you may also need to untick Use local debug runtime shared libraries when debugging from Flex Build Path>Library Path

Flash Builder 4 – ASDoc hints in the IDE, commenting for yourself!

Wednesday, November 24th, 2010

A really nice feature in Flash Builder 4 is the displaying of ASDoc hints by default on hover over delay. Now it makes sense to comment the code with ASDoc tags, not just for API dev, but also because the hints will pop up for other developers on your team and yourself.

ASDoc FB4 IDE Hinting

This gives an added incentive for developers to comment their code with function/variable/class descriptions along with relevant @param, author, returns tags.

If you still want to generate and publish the actual ASDoc html files from within the FB4 IDE, heres a very good tutorial from Arjan on Flex-blog.com to get you sorted. I made one change to Arjan’s setting up the ASDoc.exe tool to run as an External tool rather than a command prompt. I set the ‘Working Directory’ to ${folder_prompt}, so that each time you run it, you get to choose which project folder you want to target (usually in you Flash/Flex Builder Workspace somewhere). Also, as we may need to target different versions of the Flex SDK, I’ve named the External Tool Configuration ASDoc SDK 3.4, to mimic the location of the ASDoc.exe.

External Tools Configuration - ASDoc Generation from within Flash Builder 4

Problem Finding and Downloading Flex Builder 3 and Flex 3 SDK's

Wednesday, November 17th, 2010

It has gotten difficult to find the download for Flex Builder 3 now that Adobe is pushing Flash Builder 4.

You can find the Flex Builder 3 download link on the M&S Consulting  blog.

You can also use Flash Builder 4 to work on Flex 3 projects, by pointing the compiler to a relevant sdk download, good tutorial and screencast on the Adobe Site by Andrew Shorten.

A list of Flex 3 SDK versions are available to download here. The FB3_Updater.exe (used for updating for flash 10 i think) is available here.