Reputation: 172
When I compile my application with ant and incremental build, the embedded images provoke runtime exceptions.
[Embed(source="/assets/logo.png")]
[Bindable]
public var logo:Class;
<mx:Image source="{logo}" />
provokes something like
ReferenceError: Error #1065: Variable FileName__embed_mxml__assets_logo_png_2016241504 is not defined.
A work around is to turn off the incremental build, but with this solution, the build process takes to much time (3 - 4 times longer then with incremental build).
With Flex 4.1, this problem didn't exists and it appears while trying to upgrade to Flex 4.6
Here some parts of my ant script
<macrodef name="flex-compile-debug">
<attribute name="mxmlfile" />
<attribute name="swffile" />
<sequential>
<echo>Debug Build</echo>
<mxmlc file="@{mxmlfile}" output="@{swffile}"
debug="true" incremental="true" keep-generated-actionscript="true"
services="${dir.webcontent}/WEB-INF/flex/services-config.xml" context-root="/fem"
locale="fr_FR" static-link-runtime-shared-libraries="false">
<load-config filename="${FLEX_HOME}/frameworks/flex-config.xml" />
<define name="CONFIG::fembeta" value="${flex.beta}"/>
<source-path path-element="${FLEX_HOME}/frameworks" />
<source-path path-element="${dir.flex.src}/locale/fr_FR"/>
<compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
<include name="libs" />
<include name="locale" />
</compiler.library-path>
<compiler.library-path dir="${dir.webcontent}/WEB-INF/flex" append="true">
<include name="libs" />
<include name="locale" />
</compiler.library-path>
</mxmlc>
</sequential>
</macrodef>
Thanks for your help
Upvotes: 1
Views: 422
Reputation: 31
the solution is to use Java 7, more informations on this forum : http://www.flashdevelop.org/community/viewtopic.php?f=6&t=12900
Upvotes: 0
Reputation: 7834
Couple of things to try:
1) Check the targetPlayerVersion in .actionScriptProperties. It should be at a minimum 11.1
2) Make sure the flash compiler and version are reflected properly in all files.
3) Make sure every single library is recompiled from scratch after you have done the above, then go back to incremental.
Upvotes: 0