Categories
AS3 FDT Flash

Create SWC library from FDT

I use Greensock Tweening Platform a lot, it awesome. Download it (here for example) and you have everything you need.

Now I start working with SWC files and they are so compact: I love it.
But how do you get a library in a SWC? Google has an answer but it’s very complex.

The best answer is from Bruno Fonzi on

Twitter / Bruno Fonzi: How to create SWC librarie ….

How to create SWC libraries from FDT:
Right click Project > Run as > FDT Library
or
Menu > Run Configurations > Create new FDT Library

So start with a New Flash Project (the name you will use for this project will be the name of the SWC: in my case “Greensock_Tweening_Platform”) and copy the com folder from the Greensock ZIP into the src (of source) folder.

If you follow the instructions and create a SWC you will get an error about: UIComponent and Vector (depends on your Project properties).

So to fix this: follow the 2 red x’s

com > greensock > loading > display > FlexContentDisplay
I don’t use this one, so delete.

The next depends on the project properties (I used SDK: Flex 3.3 and Player Version 9 and there are no Vectors in Player version 9)
com > greensock > plugins > EndVectorPlugin
I can’t use this one, so delete this on too.

Create the SWC again and your done: you have one file with the Greensock Tweening Platform in it.

One reply on “Create SWC library from FDT”

Comments are closed.