Using FDT’s Ant Tasks
When you’re using FDT, there are a lot of specific Ant tasks you can hook into or use to make compiling and debugging even simpler.
At the time of this writing, here is the complete list of Ant tasks for FDT (there will probably be more implemented in the future, as FDT is being developed really quickly):
fdt.loadProjectProperties
(only from FDT 4.1 and up)fdt.browse
fdt.extSWFViewer.focusWindow
fdt.extSWFViewer.startSWF
fdt.flashCompile
fdt.launch.application
fdt.launch.library
fdt.launch.resetFlexCompiler
fdt.startDebugger
fdt.startProfiler
FDT works with launchers, which are basically
shortcuts for viewing your project in a specific version of the Flash
Player. You can use them when calling the swflauncher
argument with your Ant targets. Here
is the list of launchers you can use with FDT:
External SWF Viewer
Adobe Flash Player
Browser
Internal SWF Viewer
AIR Debug Launcher
The first built-in FDT Ant task we’ll look at is fdt.launch.application
. With this task, you can
compile, debug, and profile your application. Let’s take a look first at
compiling.
Compiling (with FDT Ant Tasks)
Compiling with FDT Ant tasks is a bit simpler than directly calling the compiler:
<target name="compile-fdt" description="Compile a SWF with FDT Ant Tasks" depends="create-timestamp"> <fdt.launch.application debug="false" projectname="${FDTProject}" mainclass="${project.classpath}${project.document.class}${project.file.extension}" target="${project.bin.path}${file.separator}${project.document.class}_${current.date.time}.swf" ...
Get Automating ActionScript Projects with Eclipse and Ant now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.