rss twitter

Posts Tagged ‘swc’

Add Linked Resources (as a src folder) to ANT builds

Here's another quick snippet to add Linked Resources to a compile process built with ANT. You know, you can link a whole directory to be a "Linked Library" in FDT, e.g. Greensock's TweenLite. Doing so means that you cannot use the -library-path argument as it only work with .swc files. Instead of this use -source-path to successfully add a whole directory to be compiled into your SWF.

XML:
  1. <arg value="-source-path=/Users/marvin/libs/greensock-as3" />

This way you can use it in an AIR build as well and you do not have to replace your directory based libraries with SWC files.

Using SWCs within AIR packaging with ANT

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:
  1. <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:
  1. 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..

My daily use of Assets in FDT

Hey,
yesterday I had to explain to someone why and how to use Assets in Powerflasher's FDT. I thought of summing it up to show how I (almost daily) deal with that topic.

For those not knowing: When talking of Assets I mean Classes & Symbols which are exported to a SWC file from Adobe Flash itself and then used as a Linked Library in FDT - I know this term might not be 100% precise but I'm used to it, I just claim it's a proper name because of it's capital A. :) These Assets can be fonts, audio files, videos, bitmaps and of course DisplayObjects. The advantage of using Assets on the one hand is that you do not have to use Embed-Tags to include media files or fonts - as long as they are supposed to be compiled with the project and not loaded on runtime. On the other hand you can export animated clips from the Flash IDE and then add them to your stage and set up your code in FDT. You can even nest clips into another and still refer to them.

Read more »

Powered by WordPress | Free T-Mobile Phones for Sale | Thanks to Palm Pre Blog, Video Game Music and Get Six Pack Abs