FLASHEFF2 ERROR: Target must be a non-null DisplayObject.

Posted by mareb 
FLASHEFF2 ERROR: Target must be a non-null DisplayObject.
October 26, 2010 04:17PM
I'm trying to add a FESBrightSquares to a movieclip added dynamically from library using addChild but got the FLASHEFF2 ERROR: Target must be a non-null DisplayObject. Anyone know the correct way to do it?
Re: FLASHEFF2 ERROR: Target must be a non-null DisplayObject.
October 27, 2010 07:03AM
When you set the flasheff target make sure that the object exist or is not null. Most probably this is your problem, but if you don't manage to make it work please let us know.
Re: FLASHEFF2 ERROR: Target must be a non-null DisplayObject.
December 10, 2010 02:30PM
Hello,

I have almost the same issue.
I load a swf dynamically, and when I want to apply an Eff fx, I've got the same error message.
Here a sample of my simple code :

var chargeur:Loader = new Loader();
var cli:LoaderInfo = chargeur.contentLoaderInfo;
addChild(chargeur);
var maRequete:URLRequest = new URLRequest (MySwf.swf);
chargeur.load ( maRequete );
addChild ( chargeur );

Then, when the loading is complete I run a fonction like that :
function MyEff():void {
	var effect:FlashEff2Code = new FlashEff2Code();
	addChild(effect);
	var showEffect:FESBrightSquares = new FESBrightSquares();
	showEffect.tweenDuration = 2;
	effect.showTransition = showEffect;
	effect._targetInstanceName = "chargeur";
}

And I've got this error msg " FLASHEFF2 ERROR: Target must be a non-null DisplayObject. "

Any ideas ?

Thank you and sorry for my bad english, I'm not fluent yet. :)
Re: FLASHEFF2 ERROR: Target must be a non-null DisplayObject.
December 10, 2010 02:53PM
try this:
effect._targetInstanceName = chargeur.name
or
effect.target=chargeur
Re: FLASHEFF2 ERROR: Target must be a non-null DisplayObject.
December 10, 2010 03:03PM
" effect.target=chargeur " --> works. :)
Thank you for you answer.
Re: FLASHEFF2 ERROR: Target must be a non-null DisplayObject.
December 10, 2010 05:14PM
I've had similar problems. I fiound that if you change the instance name (at least for text) AFTER you set up your EFF2 component, you will get that error. My only solution has been to re-create the component if I changed my instance name.

I wish I knew this ahead of time. I changed all my text instance names and now have to do the fx over again.

Make sure you have an instance name you can live with.

If I am wrong about this, please let me know. Thanks.
Re: FLASHEFF2 ERROR: Target must be a non-null DisplayObject.
December 13, 2010 09:17AM
Well, if you change target's name is certain you will receive errors. If you change the text's instanceName after you set flasheff target make sure you change the target to current instanceName.
Sorry, you do not have permission to post/reply in this forum.