header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
athi
Points:20
Posts:0
Answered

5/24/2010 1:46:28 AM

Title: Compile Multiple flex files


hi
i want to compile multiple flex files using ant tasks
i am new in flex and i used flex 4,blazeds and java


any body help me to give any sample code for to compile multiple flex files using ant tasks

regards
athi



1
Derek
Points: 0
Posts:0
5/24/2010 2:01:07 AM



MXML compiler won't compile more than one MXML at a time, so parallel compilation of multiple MXML files is not possible.

2
Kevin
Points: 0
Posts:0
Accepted Answer
5/24/2010 2:08:30 AM



Use Ant-Contrib task foreach to compile all the MMXL files in a loop.


<target name="flex-compile" description="Build each MXML file">
                <foreach target="build-each-mxml" param="file">
                <path>
                                <fileset dir="${flex.src.dir}">
                                        <include name="**/*.mxml"/>
                                                   </fileset>
                        </path>
        </foreach>
    </target>

<target name="build-each-mxml" description="Builds a mxml file">
                <echo>Each File Name: ${file}</echo>
                        <exec executable="${mxmlc.exe}">
                                         <arg value="${file}" />
                                       </exec>
        </target> 

3
athi
Points: 20
Posts:0
5/25/2010 2:25:23 AM



hi
thank for ur help. i used ur code in my build.xml file.
but the error is
Problem: failed to create task or type foreach
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.


regards
athi



Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 7+6 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions