Bitmap&Load

Posted by nuovobuio 
Bitmap&Load
November 30, 2009 05:34PM
hello guys, help ..

I just bought FleshEff2, (sorry for English, I'm Italian).

Following tutorial, and pdf, I do not understand how to apply an effect to my code, you help me?

import com.jumpeye.Events.FLASHEFFEvents;
import com.jumpeye.flashEff2.filter.reflection.FEFReflection;

var effect:FlashEff2Code = new FlashEff2Code();
addChild(effect);

var reflection:FEFReflection = new FEFReflection();
reflection.refresh=false;
reflection.reflectionAlpha=0.8;
reflection.reflectionRatio=160;

effect.addFilter(reflection);


var ftBitmap:Bitmap;


var contenitoreFoto:MovieClip = new MovieClip();
addChild(contenitoreFoto);

carica()

function carica():void {
	var request:URLRequest=new URLRequest("foto1.jpg");
	var loader:Loader = new Loader();
	loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
	loader.load(request);
}


function completeHandler(e:Event) {
	trace("Caricamento completato!");
	
	ftBitmap=Bitmap(e.target.loader.content);
	var bitmapData:BitmapData=ftBitmap.bitmapData;
	var newBitmap:Bitmap=new Bitmap(bitmapData);

	newBitmap.smoothing=true;

	contenitoreFoto.addChild(newBitmap);
	
	effect._targetInstanceName="contenitoreFoto";
}

I want to apply the reflection to the movieclip "contenitoreFoto", but gives me this error:

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



Edited 1 time(s). Last edit at 11/30/2009 09:20PM by nuovobuio.
Re: Bitmap&Load
November 30, 2009 09:24PM
mmmm I wrong English? Can you understand what I wrote? :-?
Re: Bitmap&Load
December 01, 2009 05:17PM
help guys..
Re: Bitmap&Load
December 02, 2009 08:07PM
Re: Bitmap&Load
December 03, 2009 03:38PM
nuovobuio,

Please try to set the FlashEff's target trough the "target " property like in the sample code bellow and let me know if that problem persists.

effect.target="contenitoreFoto";
Sorry, you do not have permission to post/reply in this forum.