I've hit a bit of a brick wall trying to do something that I figured would be a relatively simple task. I'm working on multiple projects and I'm trying to build a number of SWC libraries shared between a number of Actionscript projects using Flash Builder 4. The projects using the SWC's build just fine, but yield this error when run:
VerifyError: Error #1014: Class <whatever> could not be found.
Here's a simple example:
1) Create a new library project.
2) Add a new Actionscript file in the "testpackage" package.
3) Slap this code into that file:
public class stuff
public function Testing():void
4) Create a new Actionscript Project named Launcher
5) In "Properties->Actionscript Build Path", hit "Add SWC Folder" and browse to wherever the library project gets built to.
6) In the AS file that's generated, add code something like:
public class Launcher extends Sprite
public function Launcher()
var s:stuff = new stuff();
7) Run this bad boy.
I get the above error and I have no idea why. Everything builds fine so I'm not sure what I'm doing wrong. I read somewhere that you can manually extract the .swf file from the generated .swc and load that explicitely in code. This is a pretty horrible workflow and I hope it's not the answer
Thanks a ton in advance!
Check linkage type in Build Path for project Launcher when you add Swc folder. It has to be merged into code.
If it is external, you'll see this error.
That aside, why not do "add project" instead of "add swc folder"?
OK thanks, wish I would've asked earlier
I'm using a big hodgepodge of custom libraries and open source stuff, so I'd like to just have what I need in one big lib folder and be done with it.