You are right as long as loading the dll happens "after" the classes of
the loading swf are initialized. If you export your classes to frame 2
and load the dll in frames 1, everything works as expected.
Cheers,
Ralf.
Aral Balkan wrote:
> Hi Ralf,
>
> Sorry, I wasn't clear in my original reply: It will *compile* but it
> won't work as expected. In other words, although your "subclass" will
> contain any members you have set in it, it *will not* contain any
> inherited members because Flash doesn't know what those are at compile
> time.
>
> So, for example, if you have:
>
> class com.ariaware.tests.dll.library.FirstClass
> {
> function FirstClass()
> {
> trace ("FirstClass constructor");
> }
>
> function aMethod()
> {
> trace ("FirstClass.aMethod()");
> }
> }
>
> and
>
> class com.ariaware.tests.dll.SubFirstClass extends
> com.ariaware.tests.dll.library.FirstClass
> {
> function aNewMethod ()
> {
> trace ("A new method");
> }
> }
>
> and in the main app, you do the following after the DLL has loaded:
>
> var subFirstClass:SubFirstClass = new SubFirstClass();
> subFirstClass.aNewMethod(); // "A new method"
>
> subFirstClass.aMethod(); // undefined
> trace ("subFirstClass.aMethod = "+subFirstClass.aMethod); // undefined
>
> You will see that the "inherited" method doesn't exist (which makes
> complete sense because how could Flash know what that was at compile-time?)
>
> Aral
>
> Ralf Bokelberg wrote:
>
>
>>Hi Aral
>>You can use an intrinsic class or the original one and an exclude.xml to
>>make it compile. I'd prefer intrinsics, though.
>>Cheers,
>>Ralf.
>>
>
>
>
> _______________________________________________
> 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