It was something with flex internals, flex can't register class with
different variables values. Following works for me
package
{
import flash.display.Sprite;
public class [EMAIL PROTECTED]@ extends Sprite
{
[Embed(source='../../@FONT_FILE@', fontName='@FONT_NAME@',
mimeType='application/x-font')]
public var myFont:Class;
}
}
and ant macro:
<macrodef name="compileFont">
<attribute name="file" />
<attribute name="name" />
<attribute name="srcDir" default="${basedir}\src\as\" />
<attribute name="destDir" default="${basedir}/bin" />
<attribute name="templateFile" default="_FontTemplate.as" />
<sequential>
<copy file="@{srcDir}/@{templateFile}" overwrite="true"
tofile="@{srcDir}/[EMAIL PROTECTED]" encoding="utf-8">
<filterset>
<filter token="FONT_FILE" value="@{file}" />
<filter token="FONT_NAME" value="@{name}" />
</filterset>
</copy>
<java jar="${flex2.sdk}\lib\mxmlc.jar"
dir="${flex2.sdk}\frameworks" fork="true" failonerror="true">
<arg line="
-load-config '${flex2.sdk}/frameworks/flex-config.xml'
-output '@{destDir}/[EMAIL PROTECTED]'
-source-path 'C:/Documents and Settings/robert/Moje
dokumenty/work/VirtualDraftsman/src/as'
-file-specs 'C:/Documents and Settings/robert/Moje
dokumenty/work/VirtualDraftsman/src/as/[EMAIL PROTECTED]'" />
</java>
<move file="@{destDir}/[EMAIL PROTECTED]"
tofile="fonts/@{name}.swf" />
</sequential>
</macrodef>
happy coding ;)
--
Robert Was
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/