I guess i have to extend Class C from class A directly. I met this problem, when i tried to extend a component. In my case , The Class C want to replace the myMethod in this parent class Class B, kept others unchanged.And myMethod in Class C still need to call A.myMethod.
--- In [email protected], "Alex Harui" <[EMAIL PROTECTED]> wrote: > > Sorry, but I think you're wrong or misunderstood. If a method is > overridden, you can skip around the override like you can in some other > languages > > > > ________________________________ > > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of justinbuser > Sent: Wednesday, May 30, 2007 10:50 AM > To: [email protected] > Subject: [flexcoders] Re: Is there any way to call super.super.method in > AS3? > > > > > > --- In [email protected], "wpding" <wpding@> wrote: > > > > I want to override a method of a super class. and I can use > > super.method to invoke the corresponding method of the super class. > > > > But how i can call a method of the super super class. > > for example. > > Class A{ > > protected function myMethod(){} > > } > > Class B extends A{ > > override protected function myMethod(){} > > } > > > > Class C extends B{ > > override protected function myMethod(){} > > } > > > > Is it possible to call A.myMethod in the function C.MyMethod? > > > > Thanks > > > Yes, exactly how you wrote it. However in order to have the top level > function actually run before adding methods etc... with level 2 you need > to call super.myMethod(); from B or not override it at all in B to be > able to access it's functionality! from C. In other words, if you > override a function and then try to override it again in a class > extending the one with the original override and don't call the super > version in the intermediate class then you end up with an empty function > at the end. > > JjB > > -#As always I could be completely wrong, but it's not likely#- >

