Hi iiley,
you need to load the dll before the inheriting classes. In MTASC you
could use -frame to specify the frame of the inheriting classes.
Cheers,
Ralf.
iiley wrote:
> Thank you for your reply Aral, i am sorry that i made mistake expression
> in english, "extend" should be "inherit" that i mean a class in
> application like this:
>
> class test.application.SubFirstClass extends FirstClass{
> ...
> }
>
> It doesn't works.
>
> 2006/1/13, Aral Balkan <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>:
>
> Hi Iiley,
>
> I am assuming you mean "extend a dynamically loaded class at runtime."
> (Otherwise, of course, you can use regular compile-time inheritance to
> extend classes you include in your DLL swfs.)
>
> You can "extend" a dynamically loaded class at runtime if you use the
> first method and mark it as "dynamic intrinsic".
>
> eg.
>
> // You must define intrinsic classes if you want type checking to work
> with dynamically loaded classes
> // If you make it *dynamic* also, you can extend it after loading it
> into your app.
>
> dynamic intrinsic class com.ariaware.tests.dll.library.FirstClass
> {
> public function aMethod():Void;
> }
>
> Then, once it's been loaded, you can extend it using the good 'ol
> AS1-style prototype object:
>
> eg.
>
> // Called when the DLL has completely loaded
> private function dllComplete ( evt:DLLEvent )
> {
> //...
>
> //
> // Extend the library classes
> //
> FirstClass.prototype.aNewMethod = function ()
> {
> trace ("AS1 style baby!");
> };
>
> //
> // Test the library classes
> //
> var firstClass:FirstClass = new FirstClass();
> firstClass.aMethod();
> firstClass.aNewMethod();
>
> //...
> }
>
> I just wrote up a blog post on it. You can download the updated example
> files from there:
> http://www.flashant.org/index.php?p=501&more=1&c=1
> <http://www.flashant.org/index.php?p=501&more=1&c=1>
>
> hth,
> Aral
>
> iiley wrote:
>
> > Hi,
> >
> > Today i did some research of "Using a SWF as a DLL", follow the way
> > introduced from " http://www.osflash.org/using_a_swf_as_a_dll?s=dll",
> > first thanks Aral Balkan and Clément Arnoux's introducion, it's very
> > clear.
> >
> > But, after i did some research, i found that you can't extending a
> > class which will be loaded.<snip>
>
>
>
> _______________________________________________
> osflash mailing list
> [email protected] <mailto:[email protected]>
> http://osflash.org/mailman/listinfo/osflash_osflash.org
>
>
>
>
> --
> iiley
> AsWing http://www.aswing.org
> Blog http://spaces.msn.com/members/iiley/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> osflash mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/osflash_osflash.org
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org