Using SWC libraries - devboy/buildr_as3 GitHub Wiki
Buildr-as3 makes it really easy to link against swc libraries when compiling your project. Let's say we want to tween something using the TweenMax tweening-library by greensock. Download the greensock.swc and put it inside a directory of your project. I chose lib/main/as3/swcs as the directory for my swc-files.
We start with the buildfile from Compiling a SWF, where we need to add our greensock.swc as dependency. We are going to use the compile.with method to add our swc:
compile.with _(:lib,:main,:as3,:swcs,"greensock.swc")
Our buildfile should now look like this:
require "buildr/as3"
define "UsingSWCLibraries" do
compile.using :mxmlc,
:flexsdk => FlexSDK.new("4.5.0.20967"),
:main => _(:source, :main, :as3, "Main.as")
compile.with _(:lib,:main,:as3,:swcs,"greensock.swc")
end
If you want to add a directory containing swc-files as a dependency, you can do that in the exact same way and buildr-as3 will figure it out. So referencing the directory containing our swc will work as well:
compile.with _(:lib,:main,:as3,:swcs)