Question

I created SWC with classes, functions and symbols. When I trying import it to library in Adobe Flash CS3 nothing happens. If I create SWC without functions it is imported to library without problems. Is it expected behaviour? Or is it bug of Adobe Flash CS3? Do Flash CS4 and Flash CS5 import SWC with functions without problems and then can use functions from SWC?

Was it helpful?

Solution

SWC archive usually contains compiled code, an XML file that describes what classes and symbols where compiled into it and other optional parts such as images or sounds or basically anything else you may be using in your project. There are versions of the XML file contained in the archive, some versions aren't recognized by Flash CS3 because they appeared after the program was released. Besides that, CS3 had a requirement for SWC that it has to contain at least one class definition of a class that extends DisplayObject - this is because historically SWCs were used for Flash IDE components and components where meant to be UI objects.

AFAIK, there were issues with COMPC not being able to compile an SWC that can be used in Flash CS3 (something related to signing the library IIRC), but, if this is the case, it is usually better to compile using Flex compilers while using SWCs generated from Flash IDE, but not the other way around.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top