How do you setup an Ant task to build and embed ActionScript Workers?

When we develop locally, FlexBuilder takes care of building and embedding the 
worker for us. We just add the base ActionScript file (Worker.as) in the 
'ActionScript Workers' section of the project properties and choose the 'embed' 
option.

Our production build environment uses Ant to build from the command line using 
mxmlc. Here's an example from our current config:

 <target name="debug"> 
        <mxmlc file="${APP_ROOT}/Main.mxml" output="${OUT_ROOT}/Main.swf" 
incremental="false" debug="true" fork="true">
            <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/> 
            <source-path path-element="${FLEX_HOME}/frameworks"/> 
            <compiler.source-path path-element="${LIB_ROOT}/src"/> 
            <compiler.source-path path-element="${basedir}/src" />
            <compiler.library-path dir="${basedir}/libs" append="true">
                <include name="*.swc" />
            </compiler.library-path>
            <compiler.library-path dir="${basedir}/libs_ant" append="true">
                <include name="*.swc" />
            </compiler.library-path>
            <includes symbol="mx.managers.systemClasses.MarshallingSupport" />
            <arg line="-swf-version=18" />
            <arg line="-target-player=11.5" />
        </mxmlc> 
</target>


Thanks for any help!
Jesse

Reply via email to