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:
XML:
-
<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:
Actionscript:
-
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..