Ant build for actionscript project

I'm trying to switch to ant build in my actionscript projects. What i'm trying to do is incremental compile of two classes. For ex. I want to compile first Preloader.as and get an output bin/Preloader.swf and than compile Main.as and get an output as bin/Main.swf. I set up the jsdk and build.xml. But it didn't worked.

My build.xml is

<?xml version="1.0" encoding="utf-8"?>

<project name="DilekAgaci" basedir="C:\Users\Emrah\Desktop\works\wanda digital\DilekAgaci\" >

    <taskdef resource="flexTasks.tasks" classpath="lib\flexTasks.jar"/>

    <property name="FLEX_HOME" value="C:/flex4"/>
    <property name="OUTPUT_DIR" value="${basedir}bin"/>
    <property name="APP_ROOT" value="${basedir}"/>


    <target name="preloader">

        <mxmlc file="${APP_ROOT}/Preloader.as" output="${OUTPUT_DIR}/Preloader.swf" keep-generated-actionscript="true">
            <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
            <source-path path-element="${FLEX_HOME}/frameworks"/>
        </mxmlc>

    </target>


    <target name="main">

        <mxmlc file="${APP_ROOT}/Main.as" output="${OUTPUT_DIR}/Main.swf" keep-generated-actionscript="true">
            <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
            <source-path path-element="${FLEX_HOME}/frameworks"/>
        </mxmlc>

    </target>


</project>



I'm not sure that compiling actionscript files (.as)  with mxmlc task is possible?

And also the <load-config filename= and <source-path path-element tags are marked as red.

I couldn't find a startup example for IntelliJ and compiling actionscript projects ( not flex projects ), all helps would be appreciated.

Thanks
2 comments
Comment actions Permalink

Anyone has a clue?

0
Comment actions Permalink

There's no difference in compiling ActionScript and Flex application if you use compiler from Flex SDK. So you can use IDEA's own builder instead of ant. Just specify main class and output file name in Flex module (or Flex facet) settings.

Mxmlc ant task should work as well. What does your failure look like?

0

Please sign in to leave a comment.