Skip to content

Automated Flash CS4 builds from Flash Builder

2010 September 7
by Tedb0t

VICTORY IS MINE! ¬†After hours of hacking, I managed to get Flash Builder to compile multiple FLAs, copy them to a server, and then open the target in a web browser and connect it to the console using the scripts I devised earlier. ¬†Here’s what I had to do.

  1. Install ANT for Flash Builder.
  2. Put together an ANT build file (i.e. build.xml):
    <?xml version="1.0" encoding="utf-8" ?>
    <project name="Flash Compile" default="Compile All" basedir="./">
    	<property name="script" value="/Users/daleth/Projects/Oddcast/Avon/" />
    	<property name="browser" value="Safari" />
    	<property name="local.path" value="" />
    	<target name="Compile All">
    		<exec executable="${script}">
    		<!-- <antcall target="Open in Browser"></antcall> -->
    	<!-- Open in local browser -->
    	<target name="Open in Browser">
    		<exec executable="open">
    			<arg line="-a ${browser} ${local.path}" />
  3. Go to your project properties in Flash Builder and then “Builders”
  4. Uncheck “Flex”
  5. Click “New…”
  6. Add the path to your build.xml in the Main/Buildfile box
  7. Go to “Targets” and “Set Targets…” for “Manual Build”
  8. Choose both the “Compile All” and “Open in Browser” targets and make sure they execute in that order
  9. Go to “Build Options” and make sure “Allocate Console” and “Launch in background” are checked.
  10. Go to “Run/Debug Settings” in your project properties
  11. Remove any “URL or path to launch” since we’re specifying it in our buildfile
  12. Now when you hit Command-F11, your launcher will use the new builder, and you’ll still get your console and debugger just like normal!!

Related Posts:

One Response

Trackbacks and Pingbacks

  1. Setting up Flash Builder 4 | Limina.Log

Comments are closed.