> The way you had your code, the Child class will never receive
> the killingFocus call. Add a Delegate within the Mother Class
> to put the onKillFocus event into scope with Child...
>
> import mx.utils.Delegate;
>
> class Mother extends MovieClip {
> public var txt:TextField;
>
> public function Mother() {
> //this.onPress = killingFocus;
> this.txt.onKillFocus = Delegate.create(this, killingFocus);
> }
>
> public function killingFocus():Void {
> trace("testFunc in mother");
> }
>
> }
Hmm - this seems to go against the stuff we've been talking about recently
(see 'super and this' thread) where people have been saying that inherited
classes are essentially wrapped into one. This is an example where the
ancestor is being treated as an object in its own right. If inheritance
worked the way people described in the previous thread, it ought not to be
possible for a command to bypass the Child class and go straight to the
Mother.
Danny
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com