[partially solved] how to remove target from FlashEff in AS3 ?

Posted by user1259646 
[partially solved] how to remove target from FlashEff in AS3 ?
May 23, 2012 10:14AM
[partial solution]
I solved it in the meantime by simply not deleting but hiding the target.
__________________________________________________________________________________________


I created an effect using the Panel and also according to this post: [www.flasheff.com]
But how to remove the target from FlashEff, so I can delete the target from Display List?

Basically, my code looks like this:

function mouseOverHandler(e:MouseEvent):void {
	this.addChild(tooltip);	
	flasheffInstance.target = tooltip;
	flasheffInstance.show();
}

so far so good.

But there:
function mouseOutHandler(e:MouseEvent):void {
	e.currentTarget.removeEventListener(e.type, mouseOutHandler);
	flasheffInstance.target = null;
	removeChild(tooltip);
}

I get error message:
FLASHEFF2 ERROR: Target must be a non-null DisplayObject.

So, I have to remove this tooltip which is assigned as target to flasheff instance. After, on next mouseover, I'd like to add the tooltip again and make it the target, etc. How to achieve it?



Edited 2 time(s). Last edit at 05/24/2012 09:06AM by user1259646.
Re: [partially solved] how to remove target from FlashEff in AS3 ?
May 25, 2012 02:49PM
Why exactly do you want to remove the target on mouse out?
If you want to stop the effect, you need to simply call removeEffect method.
Re: [partially solved] how to remove target from FlashEff in AS3 ?
May 27, 2012 10:18AM
It is for a normal tooltip implementation (show tooltip on mouseover with some fancy effect, then delete/hide on mouse out). But I already changed my project to not create/delete the tooltip, but instead to show/hide it, so all is working with FlashEff. I'll try the removeEffect.. Thanks!
Sorry, you do not have permission to post/reply in this forum.