View Full Version : apply color to sprite
tarjinder80
09-24-2007, 10:45 AM
Hi,
I want to apply color to sprite at runtime from colorpicker component. Sprite contains images.
Please suggest me the way to apply color to sprite.
Thanks
dr_zeus
09-24-2007, 06:20 PM
Can you explain in more detail what "apply color to sprite at runtime" means?
tarjinder80
09-27-2007, 07:50 AM
Hi,
COde example
_sprite = new Sprite();
loader=new Loader();
request=new URLRequest(path);
loader.contentLoaderInfo.addEventListener(Event.CO MPLETE,onComplete);
thumb.addEventListener(MouseEvent.MOUSE_DOWN,onMou seDown);
thumb.addEventListener(MouseEvent.MOUSE_UP,onMouse Up);
loader.load(request);
_sprite.addChild(loader);
now i want to apply color from Colorpicker component to _sprite.
Select a color from COlorpicker and apply to _sprite.
I try like this
_sprite.transform.colorTransform = new ColorTransform(1,1,1,1);
but it is not working.
pls give me some solution.
Thanks
dr_zeus
09-27-2007, 06:08 PM
What I mean is, how do you want the color to be applied? I believe by default, ColorTransform should change everything to the same single color. Do you expect the images to be visible, but the colors to be slightly modified to match your color choice?
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.