Flash CS3 thinks that SWCs are for UI components. You can create a SWC with a manifest.xml (in Flex Builder), drop it into your components directory, and use it. That's great for UI components, but not for class libraries.
On an older project, the developers using my library just linked to the source code directly to compile. I told the new developer to do that, but he quickly pointed out that the new version of my library used Adobe's corelib library... which is also a SWC.
So the first thing I did was take the source of corelib and zip it together with the source code of my library to give to the developer. Now he could work while I solved this SWC problem. I saw a post on the corelib group site, but it did not quite solve my problem. So I emailed one of the corelib developers from Adobe.
He thought I should be able to add any SWC to the CS3 project's classpath (file->publish settings -> flash.) That did not work. I was able to compile against classes in the SWC, but got runtime errors equivalent to a Java NoClassDefError.
About the same time, I was reading some documentation on PureMVC, an AS framework that looks promising to me. I noticed that it was supposed to be able to work with Flash CS3 and it was distributed as a SWC. I read the install directions for CS3 ... they indicated that you needed to use the source code, not the SWC.
So now I'm thinking that there may not be a solution to this problem. Maybe this is a bug in Flash CS3?
Did you ever solve this? We're having the same issue on our end.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteUnfortunately no. However, it does work as you would expect in the betas of Flash CS4 (at least up to beta 3, I haven't tried beta 4.) You just add the SWC to the classpath under Publish Settings / Flash. So it looks like Adobe fixed this is CS4, but not in CS3.
ReplyDeleteah what a drag... do you happen to have any clue when cs4 gets released?
ReplyDeleteThis is one of the Important and memorable post.This is one of the knowledgeable post.
ReplyDeleteAndroid app developers
How to import swc in CS6
ReplyDeleteZopy games