var f:Function = mc.onRollOver mx.onRollOver = function () { f(); }
you might want to look at function.apply to get it too call in the right context. On 8/11/06, Matthias Dittgen <[EMAIL PROTECTED]> wrote:
but it doesn't work for me, because I don't want to get onRollOver from the superclass ( I don't do an extend). I just want to add some functionality to the onRollOver of the same instance of a movieclip. it's like that: var mc:MovieClip = this.attachMovie(MyClipClass.SymbolName,"mc", this.getNextHighestDepth()); var tooltip:MyTooltipClass = new MyTooltipClass(mc, "tooltiptext"); in MyClipClass, there is a public function onRollOver() {}, which works well, as long as I don't apply MyTooltipClass. in MyTooltipClass, there I call mc.onRollOver = function() {}, which overwrites the former onRollOver. But I just want to add something to the existing onRollOver. Someone? 2006/8/11, Martin Wood <[EMAIL PROTECTED]>: > > > Matthias Dittgen wrote: > > Hello list, > > > > my tooltip class uses code like this "mc.onRollOver = function() {}" > > to add its tooltip functionality to a movieclip mc. But this way it > > overwrites the onRollOver method of mc and disables the functionality > > like highlighting. > > > > So now my question (probably a really simple one): How is it possible > > to append functionality instead of overwriting? is there something > > like "super()" is for cunstructors? > > exactly. > > super.onRollOver() > > will call the method in the superclass. > > martin > > _______________________________________________ > Flashcoders@chattyfig.figleaf.com > 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 > _______________________________________________ Flashcoders@chattyfig.figleaf.com 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
-- j:pn http://www.lennel.org _______________________________________________ Flashcoders@chattyfig.figleaf.com 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