Category Archives: Flash Builder 4

Exotic Flash Builder 4 Tips and Tricks

The Flash Builder is built on Eclipse, you know, hence many of Eclipse stuff will naturally comply, also, these tips will mostly work the same in Flex Builder 3 and Eclipse.

-> Browse to any file or directory

It’s essential to be able to easily browse to the resource you’re currently looking at. There should have been a built in way to do this.

1. Click on, Run –> External Tools -> External Tools Configuration (Alternatively, click on the Favorites icon and select "External Tools Configuration")


2. Inside the "External Tools Dialog" -> Select "Program" -> click on the "New Launch Configuration" icon.


3. Inside the "Main" tab (Default) set:

  • Name: Explorer
  • Location: c:windowsexplorer.exe
  • Working Directory: c:windows
  • Arguments: /select,"${resource_loc}"


4. Go to the "Build" tab and uncheck "Build before launch"


5. Go to the "Common" tab, look for "Display in favorites menu" and check "External Tools"


You can now select any file or directory from the “Package Explorer” and browse straight to it’s location in windows explorer.


-> Extending with batch files – kill all IE processes

Flash Builder 4 can be extended using batch files (Shell Scripts on the Mac). This example uses a batch file to kill all opened IE processes before launching a new debug session.

There are a few reasons to debug a Flex app in IE. Firstly, some users still use it, and secondly I don’t want the precious tabs that are opened on my other useful browsers to be bothered. Occasionally, IE processes are left running in the background even though debug session was ended. Sometimes I simply didn’t closed the browser before running a new session. Both of these cases lead to the consuming of needed memory and slows down the system.

A batch file is merely a text file with a .bat extension.

  1. Create a new text file.
  2. Edit this file with any text editor –> Copy paste this line into it: taskkill /F /IM "iexplore.exe"  -> Save this file as kill_iexplore.bat (Double clicking on this file will kill all IE processes)
  3. Click on, Run –> External Tools -> External Tools Configuration
  4. Inside the "External Tools Dialog" -> Select "Program" -> click on the "New Launch Configuration" icon.
  5. Inside the "Main" tab (Default) set:
    Name: Kill Internet Explorer
    Location: c:kill_iexplore.bat
    (depending on were the file is saved)
    • Go to the "Build" tab and uncheck "Build before launch"
    • Go to the "Common" tab, look for "Display in favorites menu" and check "External Tools"

    — In Order to kill all IE processes before launching a new debug session

    1. Right-Click on the flex project –> Select “Properties
    2. In the properties dialog select “Builders” –> Click on “Import” and select “Kill Internet Explorer” from the list.


    -> Link with Editor

    This one is very helpful but easily overlooked, it’ll make the Package Explorer and the editor view synchronized.

    Click on this icon to make your life better.


    -> Some Important shortcuts (For Mac CTRL == CMD, ALT == Option)

    Ctrl+Shift+T Find any class SDK included
    Ctrl+Shift+R Find any resource/file (wont find SDK classes)
    Ctrl+3 Finds everything, literally everything – files, commands, views (Amazing, try it, use it)
    Ctrl+Alt+Up/Down Duplicate a line or a block of code
    Alt+Up/Down Reorder a line or a block of code
    Ctrl+D Delete a line or a block of code
    Ctrl+Shift+L+L Open Configuration
    Ctrl+K Find next (like F3)

    Less important shortcuts

    Ctrl+O Current class outline
    Ctrl+Shift+G Finds all references in the workspace
    Ctrl+Shift+L Shows all shortcuts (key binding)
    Ctrl+M Maximize the selected view
    Ctrl+J Quick Search without the search dialog (click ESC when done)
    Ctrl+Shift+X To upper case
    Ctrl+Shift+Y To lower case
    Ctrl+I Auto indent selected code


    P.S. Why exotic?! It made you look didn’t it. And beside, it is somewhat exotic.

    P.S.S. At first I thought about writing a short post with only the first tip, but, thinking about it, I think I’ll make this an ever updating page. So if you have any other tip you like to share please write about it in the comments.

    Flash Player 10.1 Global Error Handling Examples and the Flex 3.x Issue

    We all welcomed this addition to the Flash Player 10.1. The ability to catch all exceptions inside the player has lots of benefits, from proper logging on to not annoying users that has the debug player.

    There are some code examples of how to implement this feature, and indeed it was a breeze adding it for pure Flash and to Flex 4.x projects. But, somehow I had trouble making it work for Flex 3.x project. I know it’s a player dependent but still something in the Flex 3.x framework killed this functionality.

    Anyhow, eventually it did worked for me on the Flex 3.x, but I couldn’t make it to work when even 1 of the libraries, except playerglobal.swc, is external or RSL. I guess there is no escape from monkeying with the RSL loader to see if I can find a solution there.

    I’ve mad these examples available, in case you need a complete example and/or also struggling with this feature on Flex 3.x. Also, in these examples I didn’t force the user to update the Flash Player and used a compiler argument -target-player=10.1.0 instead of modifying the html wrapper.

    All examples are viewable here, you can right-click on “View Source” or download the complete Flash Builder 4 projects (for Flex Builder 3 project, look at the comments).

    GEH Pure Flash

    GEH Flex 4.1

    GEH Flex 3.5

    Note: No need for the FP 10.1 playerglobal.swc to be inside C:Program FilesAdobeAdobe Flash Builder 4sdks4.1.0frameworkslibsplayer10.1 I’ve put it inside the libs folder.

    So what is Flex then, again?!

    With the release of the new Flash Builder 4 beta yesterday, it’s my chance, again, to congrat Adobe on the name change.

    Yeah I know this is old news, Flex builder has been rebranded to Flash Builder. I just wanna join the people who welcomed it.
    Flex sounded more serious then Flash so, it served it’s purpose as a marketing term for showing the maturity of the Flash platform. Confused already?!
    I know a lot of people were and probably still are. Even seasoned Flash/Flex developers weren’t sure want is going on.
    I’ve heard comments like – “Flex is what competing with SilverLight and not Flash.” Which is obviously wrong.

    I really wonder why it’s so difficult to understand, it’s not that complicated. If you feel like you still don’t get it then, read this.

    Of course some people think this change is a terrible mistake, these are mostly the people who the name Flex was meant to attract and will rather die in pain then to say they’re Flash developers. – You can still be a Flex developer, you know!
    Some raise none important questions,  to say the least, like – will the new logo retain it’s colors? – yes it does, yes it does.

    I mostly like the change because, it reduces the pain of trying to explain common people what is Flex.
    – “There is the Flex Builder and the Flex framework.” Here you probably lost most of them already. And you end with – “but anyway everything is compiled into Flash.” – “Aha, so what is Flex then, again?!”

    Here is a screencast about the name change that also showoff the new builder.

    Anyway it’s time to get busy with the new toys:

    Get Flash Builder 4 Beta

    What’s new in Flash Builder 4 beta

    What’s new in Flex 4 SDK beta

    Get Flash Catalyst

    Flash Builder 4, Flex SDK4 and Flash Catalyst tutorial and demonstration videos

    gotoAndLearn() Flash Catalyst and Flex 4: Part 1, Part 2