I don't have a solution, but I have an arguably less ugly workaround that I've used in similar cases.
public class Superclass { public function load():Void { __load(); } protected function __load():Void { // "Base class" functionality here } } public class Subclass extends Superclass { public function load():Void { Tweener.addTween(this, {onComplete: __load}); } } On 3/4/08, Wagner Amaral <[EMAIL PROTECTED]> wrote: > Hey there Zeh! > > On Tue, Mar 4, 2008 at 12:18 PM, Zeh Fernando <[EMAIL PROTECTED]> > wrote: > > > > > > Hm.. that's a good question. It runs functions inside of the instance > > using .apply, but if you pass the super.load without wrapping it, I'm > > sure exactly how the function reference is handled by actionscript. > > > > > Yeah, I've looked at Tweener's code, even tried to tweak a little bit to see > if I could get through it, then I realized it's not Tweener's fault. > By issuing a: > trace(tScope); > on line 754, right before: > tTweening.onComplete.apply(tScope, tTweening.onCompleteParams); > it traces my current instance correctly. > > > > > > > Anyway, have you tried this instead? > > > > public function load():Void { > > var obj:Object = new Object({ > > _y: 200, > > time: 1, > > onComplete: function() { super.load(); } > > }); > > Tweener.addTween(this, obj); > > } > > > > > Yes, I tried that. Just tried again right now to make sure I wasn't missing > anything ;) > Still, no success... > > I've just pasted the code from the superclass inside the onComplete handler > (it's just a event dispatch anyway, works for now), but I really hate myself > for doing this, specially because this is a refactoring of some old crappy > code, and it's supposed to be made the right way. > Anyway, still trying to come up with something. (Boy, I really wish the boss > would let me use AS3 already, I'm sure these things wouldn't happen. AS2 > really isn't made to serious programming) > > Thanks for the help so far, Zeh! Valeu! > > > -- > > Wagner Amaral > AgĂȘncia Ginga - Brazil > www.agenciaginga.com.br > _______________________________________________ > > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > -- Cory Petosky : Lead Developer : PUNY 1618 Central Ave NE Suite 130 Minneapolis, MN 55413 Office: 612.216.3924 Mobile: 240.422.9652 Fax: 612.605.9216 http://www.punyentertainment.com _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders