I would say that the FirstClass doesn't exists at RUNtime... If the 
SubFirstClass is declared in your main SWF and FirstClass in an external 
SWF, the inheritance is executed before the exeternal SWF is loaded.
If you could create the subclass after the SWF is loaded, this should 
probably work... but it's not quite easy to do with only AS2.

The intrinsic classes (or exclude.xml) only allow you to compile with a 
class which is not implemented, but will be at runtime...

You must never forget that declaring a class is only creating a variable 
of Function type... Your code is nearly equal to

SubFirstClass.prototype = new FirstClass();

If FirstClass doesn't exists when you execute this code, it won't works, 
and it's normal! ;o)

That's why when classes are declared in external SWF, and we want to use 
an intrinsic declaration to use it in a main SWF, it's better to use 
composition, because we have control over instanciation, but not over 
declaration...

C ya

LAlex

Aral Balkan a écrit :
> Hi Iiley,
>
> That won't work at compile-time because FirstClass doesn't exist at 
> compile time in your main application.
>
> Aral
>
> 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.
>> <snip>
>>     
>
>
>
> _______________________________________________
> 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

Reply via email to