AIR, Flex / Flash, FMS, PushButton, Game… Developer
Posts tagged Tip of the day
Tip of the Day – Mocking up your application / website
Jan 24th
If you’re not sure what a mockup (or wireframe) is… it is a basic UI design of an application or website.
And now it’s actual implementation:

For a long time, I used Adobe Photoshop for all of my mocking up needs. However, last week that changed. Now my weapon of choice is Balsamiq Mockups. This handy little tool has pretty much all of the Flex components, and allows you to quickly put together a blue print of your application.
I also need to mention that when creating mockups, don’t go too elaborate with graphics. One of my biggest pet peeves is when I spend hours thinking about and creating a mockup, only to have the graphical elements picked apart by the client, “I don’t like the colors” or “What is this Lipsum crap?”.
The “napkin drawing” (or coaster drawing if you’re a big drinker) approach is the best route to take, because it forces the clients to pay attention to what elements are there, and not what they look like.
Balsamiq Mockups… best $79 I’ve ever spent.
Tip of the Day – Learn Object-Oriented Programming
Jan 23rd
Object-Oriented Programming is the staple of the entire Flex Framework. Some key concepts you need to know to be taken seriously as a developer are encapsulation, polymorphism and inheritance.
I’m not going to do a full OOP write-up today in a tip, but I am going to share with you how I learned Object-Oriented Programming.
A while back I was browsing Barnes and Noble, looking through the Web Development section, when I came across a book titled Object-Oriented ActionScript For Flash 8. Now at the time, I had decent understanding of OOP, but wasn’t really using it much within my Flash Projects. So I bought it, and was glad I did.
Going back and looking at the code in some of my old projects, I sometimes don’t know what I was thinking… or I realize how I could have much better programmed the solution.
Anyways, if OOP is something you’re interested in (which it should be), I highly recommend picking up Object-Oriented ActionScript 3.0.
Also, DevArticles.com has this post dealing specifically with OOP in ActionScript, if you’re too cheap to pick up a book.
Tip of the Day – Update your copy of Flex Builder
Jan 22nd
So I had one of those moments today… I was programming along using Cocomo and Flash Player 10, and things just were not working. I was getting all sorts of obscure errors.
Well, I decided to check my version of Flex Builder… turns out I hadn’t updated to Flex Builder 3.0.2 yet. I know that it’s been out for a few months now, and I updated Flex Builder on my PC at work, but for some reason I forgot to update it on my MacBook Pro.

Well thankfully, updating Flex Builder is a very easy thing to do.
- Help > Search for Flex Builder Updates.
- Flex Builder will check to see if there are any updates.
- Make sure you select the Flexbuilder 3.0.2 update.
- It downloads.
- Then opens up this panel, click OK, and follow the steps.
- It makes you close out your copy of Flex Builder, and your web browser.
- Come on little installer, you can do it.
- Woot.
- And my problems all went away.
If you are behind a corporate firewall or Adobe Updater is blocked for any reason, you can update Flex Builder following the steps on the Adobe Flex updater website.
Tip of the Day – Flex Builder Tips… The Flex Show style
Jan 21st
Today Jeffry Houser posted another excellent “Fifteen Minutes With Flex” video podcast. This one is titled “Episode 15: Flex Builder Tips”.
Jeff goes in depth about all the really cool shortcuts within Flex Builder and Eclipse.
It’s a must see in my opinion. He has some tips in there that I didn’t know about, such as “Working sets”.
Great work Jeff!
Tip of the Day – Compile your AIR Applications for Flash Player 10
Jan 20th
I was playing with Cocomo today and hit a wall dealing with the Flash Player 10 version of Cocomo.swc while using Adobe AIR. I created a new AIR application in Flex Builder 3, and pointed it to the Flex SDK 3.2. I then linked in the FP10 version of Cocomo.swc. Everything was going fine until I tried to run my application and it threw “Error #1065: Variable SoundCodec is not defined.”
After doing a bit of research, I learned this error occurs when trying to run Flash Player 10 code in the Flash Player 9 runtime. I thought Flex Builder would handle this for me automatically when I pointed it to the 3.2 SDK.
So here is the fix and your tip for the day.
Within Flex Builder:
- Select your AIR application in the Flex navigator
- From the menu choose, Project > Properties
- Choose “Flex Compiler”
- Add “-target-player=10″ to your Additional compiler arguments
- Click OK
This isn’t limited to Adobe AIR, you can set the target player of your Flex applications as well.
Tip of the Day – When to use include
Jan 18th
A little while ago I posed the following question to the flexcoders mailing list,
I just wanted to ping everyone and get their opinion on something. Why would anyone ever want to use the include directive? I’ve recently been working on poorly designed project where at the top of every module there is an “include Header.as” statement that has 30 include statements within it. To give a datagrid additional functionality, you give it an id=”myDataGrid”, and the include statement takes care of the rest. It’s really bad.
I just don’t see a good use for the include statement anymore. In my opinion, it just promotes bad programming practices.
I mean, can’t everything be taken care of using OOP methodologies? Thoughts?
I’d like to thank everyone who responded, you all gave me quite a bit of insight.
After thinking about this for a while now, here is my list of the common reasons people incorrectly use include (include directive).
I have common functionality that I want shared across multiple components.
That’s great that you’re using DRY philosophy! However, it’s much better to combine the DRY philosophy with object-oriented programming practices. Instead of using the include directive, abstract out common functionality into a parent class. Then you can create children of your parent component, and add additional functionality as needed.
I’m building a framework.
Great… don’t use include. See above reason.
I want to use Code-Behind.
Ted Patrick wrote a wonderful post on Code-Behind in Flex 2. He accomplishes Code-Behind, and does so in an object-oriented manner without using include statements.
Adobe doesn’t natively allow multiple inheritance in AS3, and using the include directive is the only way to fake it.
Frankly, if you understand that statement… you’re advanced enough to know what you’re doing, and you don’t need this tip.
== Conclusion ==
There are rare occasions where include is exactly what you need. However, if you still feel you have a valid reason to use the include directive on a regular basis, please leave a comment below and explain yourself.

