Hello,
some time ago i postet at flashforum.de how this can be done, without
drawbacks to the rest of the application:
http://www.flashforum.de/forum/showthread.php?t=207998
Its in german but the code is more or less internation :)
Janosch
Matthias Dittgen schrieb:
Hello list,
my toolt
I agree with Julien - EventDispatcher is ideal for this purpose. It's
one of the reasons it exists - to allow more than one object to be
notified when an event occurs.
Ian
On 8/11/06, julien castelain <[EMAIL PROTECTED]> wrote:
hi,
maybe using mx.events.EventDispatcher could help
i'm probably w
whoooaaa!
Thank to all who answered!!!
I have to read through your answers and some testing before I can make
further comments.
Matthias
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.fi
hi,
maybe using mx.events.EventDispatcher could help
i'm probably wrong, but have you tried ?
class A {
function onRollOver() {
doTheRollOver();
dispatchEvent({type:"onRollOver", target:this});
}
function doTheRollOver() {
// do somtehing here
}
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.
You have two options (or more, but
in MyTooltip you can re-assign the onRollOver to another name and call that from
the new onRollOver, like this :
in MyTooltip
mc.onRollOver2 = mc.onRollOver;
mc.onRollOver = function()
{
// some stuff here
// call the original
this.onRollOver2();
}
thats one way of doing it
martin
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
Do you mean you want to do something like...
var oldRollOver:Function = this.onRollOver;
this.onRollOver = function () {
trace("new onRollOver functionality");
oldRollOver(); //call pre-existing functionality
}
Matthias Dittgen wrote:
but it doesn't work for me, because I don't want
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.getNe
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
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
11 matches
Mail list logo