Hail, Stack!
I'm having a little trouble figuring out how to import a SWC file directly in ActionScript, without setting a library path to the file.
To exemplify, I need something like this:
package
{
[Embed(source = 'Library.swc')] // This line won't work, of course...
import ClassInsideSWC;
public class MyClass extends ClassInsideSWC
{
public function MyClass()
{
super();
}
}
}
Besides, I don't want to (I can't, in fact) import the SWC by loading it with Loader
class.
Well, someone knows a way to link to the SWC using only ActionScript Code?
Edited
Just to add more info about the problem, I'll showcase my scenario with more details...
I have a class SubClass
that wil be independent from the rest.
It will extend a class SuperClass
that is inside the SWC/SWF...
This SWC/SWF have the whole framework. I can't compile every class inside a single SWF. Every part of my framework is a SWF apart and will be downloaded by Loader class on runtime.
Sadly, @frankhermes answer won't work. That method won't download the classes and won't allow me to extend or use other classes inside the SWC.
If I setup the library path this becomes possible...