For some time now, I’ve been using a technique that allows me to skip Actionscript’s events and it’s really been helpful in writing clean code. Recently, prominent community developers such as Andre Michelle, Joa Ebert, Robert Penner, and Nicolas Cannasse have made solid critiques of Actionscript and generally AS3′s event model makes it onto their list of grievances. Andre and Joa have even created UIEvent to help deal with event listeners.
Like many other Flash developers, when I learned about creating custom events or dispatching Flash’s built-in events I started doing it a lot. But….. it can really be a pain. I find that frequently dispatching and cleaning up events really dirties my code. It also makes it harder to read. Also, event dispatchers can be so far removed from methods who are dependent on them, that a coder will often have to search around to find the callback. Because of this I avoid Flash events as much as possible, and here’s how I do it.
[Edit] Callbacks are also substantially faster than events: Grant Skinner’s recent optimization talk
In part one, I showed how to get started with FDT and Ant (live error checking, code hinting, dealing with the JRE error…). Part two is the start of incorporating Ant into your work-flow. I would classify these videos as beginner-ish, and starting to get into intermediate Ant.
Some time ago I began integrating FDT and ANT. Not long after, my friends complained about not seeing me, my desk became littered with espresso cans, and I started having lots, and lots of Chinese take out.
Mixing Ant and FDT is simply addictive – there’s just so much one can do. There are also several pitfalls that, if not prepared, can really confuse you.
Thus, I began to write down the process to aid others and to remind myself in case I forgot. Not long into this process I learned that there is a lot to cover. Instead of cramming it all into one post, I have decided to split it up among several posts.
Part one contains two videos about getting started with Ant. I’m getting back into recording videos so forgive me if I’m a little stiff. I’m getting more comfortable with recording again and I’ve even started doing a little bit of editing. Already between the first and second video, I can tell I’m getting better.
In total the series is going to cover work-flow tricks, working with live error checking, code hinting, templates (creating and using), how to extend Ant by adding Java libraries, FTP, SSH, ASdoc, SVN, debugging tricks, creating SWFObject swf -embeded HTML files, multi swf compilation and more.
We all come across things that end up saving us lots of time when used over and over again. If you use FDT, there are countless options available to enhance a development work-flow. Here are some of mine:
[NOTE: This is a combination of an old blog post I did (before my database blew up) and some new stuff thrown in]