Archive for the 'Tips' Category

FDT Tip: Organising Your Imports

The simplicity of executing this shortcut does not undermine the convenience of it. :D

This shortcut has already worked its way into my daily work flow and I can no longer code the same way as I did before, not with FlashDeveloper, not with Flex Builder. Nothing else comes close to what FDT offers.

FDT Organise Imports

Combined with the formatting shortcut, you’ll now be a true formatting king! :D

AddThis Social Bookmark Button

FDT Tip: Be A Formatting King

People are different; every developer codes in a different style. Some loves the additional white space here and there, while others could not live until their curly braces sits on a new line. You name it!

Back when I was using FlashDevelop, I was very conscious about writing beautifully formatted code. Don’t get me wrong though, I’m still exercising this, just that FDT made my life so much simpler now. The difference between now and then is that I had no choice but to code them properly so that they are pleasant to my eyes.

To each his own gripes, well for me is code formatting. Nightmare strikes whenever I have to take over a project from someone else who has no sense of formatting their codes. Trying to figure out those codes are just a plain waste of time.

FDT comes to the rescue by offering a way to auto format your code. What I love is the level of intricacy that FDT allows you to go into! Here’s the place to customise your preferences:
Window -> Preferences… -> FDT -> Code Style -> Formatter
FDT Formatter

After setting your preferences, you can now format your codes either by Source -> Format or Ctrl-Shift-F
FDT Format Shortcut

For those obsessed with their own formatting style who can’t live to see other styles (like me? *loL~*), you can _even_ format the generated codes from SWCs! ;)

Head over to Window -> Preferences… -> FDT -> Misc, and check the “Enable formatting of SWC code” option.
FDT Enable Formatting Of SWC Code

AddThis Social Bookmark Button

FDT Tip: Creating Working Sets

Knowing how to create working sets is key to a more manageable project space. If you’re handling more than a couple of projects, you will find this tip to be pretty helpful. ;)

First click on the little arrow down icon, and click on “Select Working Set…”
FDT Flash Explorer Start

By default, you should have no working sets, so let’s create one by clicking on “New…”
FDT Select Working Set

I haven’t tried what other types of working sets will provide, but really, we are more focused on managing our flash explorer at the moment aye? ;)
Click on “Flash” and then “Next >”
FDT New Working Set

Over here in this view, is the place where you specify what you want to show in your working set. If your project used some open source frameworks, it’s best to “turn them off” since you’re never going to use them directly. Basically, it all boils down to what you want to get shown.
FDT Create Working Set

*A very important note* that I want to highlight is that there are three types of checkboxes as you can see from the above screenshot: empty, tick, and square.

Empty and tick types are common, but what’s square? Square means that some folders or files in it are selected, while others are not. And because of this, you have to note that if you add new files or folders into these “squared” folders, you have to *manually update* these new folders or files.

This brings me back to my previous tip, knowing how to configure your build path. If your .swf files are in the root folder, each time you have a new file, you have to update your working set. Placing them all in the “bin” folder will always keep them updated. Sweet! :D

Once you have created your working set, don’t forget to check it before clicking “OK”. If you have multiple working sets, you can even check several of them to view them in your flash explorer all at the same time. ;)
FDT Select Working Set Done

Viola, your flash explorer is now so much cleaner! :D
FDT Flash Explorer Done

Do spend some time to play around more with working sets, because after a while, you’ll start to realise the power that it offers, allowing you to switch between projects very efficiently.

AddThis Social Bookmark Button

FDT Tip: Configure Your Build Path

I guess most of us, when we create a new flash project in FDT, will ignore most of the initial options that we can play with. However, knowing how to configure your build path, which separates sources and eventual compiled .swf files into different folders, is important. Not only will your folder structure be cleaner, it can even set you up for a greater convenience which I’ll show in a future tip. ;)

Let’s us now go through how to set up your own build path in FDT.

Here’s a screen capture of the dialog box when you create a new flash project.
Click on the second Configure defaults… as shown.
FDT Create New Flash Project Dialog

Which will bring you to the Build Path preferences.
FDT Build Path Preferences

Most people will usually name the output folder name as “bin” which stands for “binaries”, but hey, feel free to name it anything you want! :D When you compile your project now, the compiled .swf file will be placed into this output folder rather than the root of your folder structure if your default is empty.

AddThis Social Bookmark Button

FDT Tip: Tutorials To Get Started

It was bad of me to assume that everyone already knows their way around in FDT. To make up for it, here’s a tip for starters. :)

In the standalone installer version of FDT, it comes with two very short tutorials to help first timers navigate around the environment. They were useful to me, so I thought it will be good to check them out. Wouldn’t cost you anything more than 15 minutes. ;)

In FDT, go to:
Help -> Cheat Sheets… -> FDT -> First Steps

FDT Cheat Sheets Panel

In your new cheat sheets panel, you can now see the two tutorials ready and waiting for you to plow through them. ;)

AddThis Social Bookmark Button