1 Reply Latest reply on Dec 11, 2011 9:49 AM by RamsesMoreno

    Problem using SWC's with already defined classes


      Hi there, I've run into some problems using the flash builder and can't solve it on my own.
      I've used Flash CS4 for a long time and I've got a big project written with it. Several objects in library have their own classes. All classes are placed within one folder (there is a large package tree and the whole thing is under git vcs).
      I'm compiling an SWC to import it in Flash builder as a reference library. Also I'm importing the folder with a project     source code in a project source path.


      So two classes got duplicated: Flash builder has them both in the imported swc and in a source path. And it chooses the class definition in a source path completely ignoring the object contained in the swc. Is there any way to prevent it, force Flash Builder to use classes within imported swc and ignore it's source in a source path. Of course I can turn the library symbols in smthn like "meta class" and extend it with an existing source code, but I don't want to multiply classes when it is not necessary.  I have already rewritten several classes so all the TextAreas, Shapes, etc. are hardcoded, but there are still several objects with an animation and custom shapes whith their own class definitions.


      Let's say there is a symbol in a library with some complex graphics, it is linked with a class named PlanDot which extends flash.display.Sprite. There is some necessary methods and properties. Everything worked fine in Flash.
      Now with Flash builder I have to link the symbol in a library with a class named PlanDotMeta, it warns me that there is no class definition on compilation. Then in  the Flash builder I have to create class PlanDot which extends PlanDotMeta just to get the same functionality. So I've got dummy classes ruining the autocomplete function, garbaging the package tree just to make everything working like in the Flash.


      Splitting the source code in several folders and duplicating 90% of code just to get both swc export and the flash builder working is not an option, even using a symlinking.