views:

490

answers:

2

Here's what works with ant build.xml:

    <mxmlc file="${module.main.dir}/main.mxml" keep-generated-actionscript="false" output="${module.output.dir}/main.swf" fork="${flex.fork}">
        <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
        <source-path path-element="${FLEX_HOME}/frameworks"/>
        <compiler.theme file="${FLEX_HOME}/frameworks/themes/Halo/halo.swc"/>
    </mxmlc>

I tried the following values in Project > Properties > Compiler Options > Additional Compiler Options but none of them worked:

-theme=PATH_TO/halo.swc
-compiler.theme=PATH_TO/halo.swc
-theme=file=PATH_TO/halo.swc
-compiler.theme.file=PATH_TO/halo.swc
-theme.file=PATH_TO/halo.swc

Thanks.

+2  A: 

-compatibility-version=3 should fix it

or you could try

-theme=../frameworks/themes/Halo/halo.swc

Clint Modien
`-compatibility-version=3` worked quite well for me, thanks.
Adam Nofsinger
Sorry but I don't want compatibility-version=3. I only want to use halo as the theme for my Flex 4.x app. Unfortunately, I don't have a FlashDevelop setup right now so I'm unable to verify the -theme option. But based on my original post, I've already tried that flag with FlashDevelop but was not able to make it work. Thanks!
paul_sns
A: 

I am trying to compile library file using ant. i am trying to use the compatibility flag. but the ant error says "The type doesn't support the "compiler.mxml.compatibility-version" nested element."

Plz Help

<taskdef resource="flexTasks.tasks" classpath="${basedir}/BuildFlex/libs/flexTasks.jar" />
<target name="swc-AalsmeerCommon" description="Compile the AalsmeerCommon">
    <compc output="${AALSMEER_COMMON}.swc" >
        <compiler.theme file="${FLEX_HOME}/frameworks/themes/Halo/halo.swc"/>
        <compiler.mxml.compatibility-version version="3.0"/>
        <include-libraries file="${AALSMEER_COMMON_APP}/libs/">
            <include name="*.swc" />
        </include-libraries>

        <source-path path-element="${AALSMEER_COMMON_APP}/src"/>
        <include-sources dir="${AALSMEER_COMMON_APP}/src/com/bnym/scc/common">
            <include name="**/*" />         
        </include-sources>
    </compc>
    <echo>AalsmeerCommon SWC created successfully</echo>
</target>

Sachin Patil
I remember having a successful setup where compatibility-version value is set in flex-config.xml instead of ANT build file. What you want might also be possible but I haven't personally tried it. PS: Please create a new question next time instead of posting your question as answer to an existing question. That way you'd get more visibility. Thanks. :)
paul_sns