How do you set a "Document class" from an SWC in Flash CS4?
I have an SWC with a class called Content. I want to set it as the "Document Class" in Flash. However, after setting up the SWC in the .fla, I am receiving an error message saying that "A definition for the document class could not be found in the classpath,..." Setting up the direct class fol开发者_StackOverflow社区der works fine, but I need to distribute this SWC and do not want to include the sources.
Is it possible to use a class as the Document Class if it resides in an SWC?
I've found some links that seem to indicate no, but I need to find out definitively.
http://balazs.sebesteny.com/document-class-from-swc/
forums.adobe.com/thread/452045
Didn't try it myself. But maybe, if linking directly against the swc doesn't work, a possible workaround could be writting a simple do-nothing class that just extends the class in your swc and have your fla use it as the document class.
Something like:
package {
import your.package.Content;
public class MainClass extends Content {
}
}
confirmed still broken in cs5, and the subclass workaround also still works. i have informed a flash authoring team engineer at adobe. i am attempting to gain support for a fix to this issue here:
http://www.moock.org/blog/archives/000304.html
精彩评论