views:

2024

answers:

1

I have a huge project with many mxml and as files and am trying to compile them all into one working swf file using ant. However, I'm having trouble compiling main.swf correctly in ant.

It doesn't seem to be pulling in the necessary modules, all of which are located in separate folders within the main src folder.

It will compile without error, but when I open the swf file, there is no content -- just a shell. However, if I compile using flex builder 3's compile button, it will create the swf correctly -- content and all.

Even when using a simple mxmlc command, it throws an error for any file associated with the modules saying there is an unknown type (meaning it's not pulling in the modules).

Is there a special way that modules should be dealt with when trying to compile them into a main.swf file using ant?

+1  A: 

Did you include a library-path element in your Ant build file?

e.g.

<target ...>
    <mxmlc output="...../file.swf"
        ....
        file=".../main.mxml">

        <library-path dir="..../" append="true">
            <include name="...../someModule.swc"/>
Assaf Lavie
I do have a library-path element in my build. It includes all swc files from my libraries folder. But the modules I'm trying to include are not in that folder. They are controllers located in the src folder.Do all mxml modules need to be turned into swc before I can include them in my build?
I believe so, but I'm not 100% sure.
Assaf Lavie