I am using Flash Builder 4.6 and I am trying to setup up and Ant task to build and run my Flash application. I can get the Ant task to both build and run my application, but it doesn't trace to the console and breakpoints don't work.
I followed the advice of this Stack Overflow post but I keep getting the error:
[exec] Another Flash debugger is probably running; please close it. Details: 'Unrecognized Windows Sockets error: 0: JVM_Bind'.
I also followed this post's advice to properly configure my Ant script in Flash Builder but it doesn't seem to make a difference.
My AS file:
package
{
import flash.display.Sprite;
import flash.text.TextField;
public class HelloAnt extends Sprite
{
public function HelloAnt()
{
var label : TextField = new TextField();
label.text = "Hello World!";
addChild(label);
trace ("Hello World!");
}
}
}
My ANT script:
<?xml version="1.0" encoding="utf-8"?>
<project name="HelloAnt" basedir=".">
<property name="FLEX_HOME" value="C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.6\sdks\4.6.0"/>
<property name="src" value="${basedir}\src"/>
<property name="bin" value="${basedir}\bin"/>
<property name="application" value="${bin}\swf\HelloAnt.swf" />
<taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" />
<target name="run">
<echo file="${basedir}/build/.fdbinit">
run ${application}
</echo>
<exec executable="${FLEX_HOME}/bin/fdb.exe" spawn="false" dir="build">
<arg line="-unit"/>
</exec>
</target>
<target name="build">
<mxmlc output="${application}"
file="${src}/HelloAnt.as"
actionscript-file-encoding="UTF-8"
keep-generated-actionscript="false"
optimize="true"
fork="true"
debug="true"
maxmemory="1024m"
static-link-runtime-shared-libraries="true">
<source-path path-element="${FLEX_HOME}/frameworks" />
<source-path path-element="${src}" />
</mxmlc>
</target>
<target name="build-run">
<sequential>
<antcall target="build" />
<antcall target="run" />
</sequential>
</target>
</project>
I am out of ideas. Does anybody have any insight?