In addition to AIR2 and FDT4 (M3) – A detailed Walkthrough I encountered a problem when trying to use external SWCs like e.g. an assets library in your AIR package. In other words: If you're using an SWC with all your graphical stuff exported from the Flash IDE you simply rightclick it in FDT and add it to your Source path to use it in your project. This works fine in a compiled SWF but if you want to launch your project in an AIR environment it will not find the library. And I really had a look for this ("Class not found!") errors after packaging for hours but didn't find anything except an ooold AIR project by a friend of mine who used the following argument in his "Compile SWF" task:
-
<arg value="-library-path=${assets_dir}/lib/assets.swc" />
Et voilá, from then on my exported AppBg asset worked flawlessly in the ADL and packaged .air file:
-
var back:AppBg = new AppBg();
Now we're ready to take the next step: A real AIR application with chromeless layout, asset-using and some communications..



August 13th, 2010
Marvin Blase
Posted in
Tags:
[...] This post was mentioned on Twitter by Matan Uberstein, Matan Uberstein and Aiden Tailor, WE ♥ FDT. WE ♥ FDT said: New #FDT4 post published: Using SWCs within #AIR packaging with #ANT, http://bit.ly/a0kXrM (@beautifycode) [...]
Insane, just googled for it and you were by far the only resource dealing CLEARLY and useful with this question. Thanks a loooot!!
Just d/l FDT4 and want to build with AIR. Great articles, and just at the time I needed them. Thanks!
You should probably amend to:
to prevent overwriting the full -library-path
oops, wordpress stripping my pointy brackets!
You should probably amend to:
arg value="-library-path+=${assets_dir}/lib/assets.swc"
Spezial thanks, ich searched the half sunday to find a solution.