Sunday, August 9, 2009

FDT and ANT | A User's Guide - Part I

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.

Ant Templates

If you're already an experienced Ant user, you might be less interested in the videos of part one.  If this is the case go ahead and download my templates and experiment.  I'll be adding more and refining them, but these are good to get started. There are two kinds of templates available: XML file templates and Ant snippet templates.  Use the XML files templates to quickly create a basic build file, then use the Ant snippets to add functionality.

To add XML files templates go: Preferences>XML>XML Files>Editor>Templates and click import.

To add Ant snippets go: Preferences>Ant>Editor>Templates and click import.

Video One

Video one is where I go over how to get FDT to recognize your XML file as an Ant file.  Do this and you will have live error checking,  property introspection, snippets and code hinting. I also end the video by showing how to run an Ant diagnostic.

Video Two

Video two introduces properties, Ant's version of reusable variables, dealing with the dreaded JRE error, FDT's built in Ant dynamic help, then compiling and launching your .swf.

Also, please note that between videos one and two, I changed from the stand alone version of FDT to the new version of Eclipse with the latest FDT beta.  This is because I started having some file path issues, and the new version of Eclipse has better Ant support. If you are having trouble following, try installing the latest Eclipse and using the latest FDT beta.