Flex colorizer: using ColorTransform class to colorize objects at run-time

Posted by Unknown Senin, 18 Juli 2011 0 komentar
In this post I wanted to show you a nice trick how to colorize visual object at run-time.
Colorizing of the plain object (e.g. rectangle) is very simple:

var colorTransform:ColorTransform = new ColorTransform();
colorTransform.color = color;
target.transform.colorTransform = colorTransform;

But what if you need to colorize some complex object (e.g. image of the rooftop)?


Solution...


1. Prepare color layer (area that you want to colorize) and save it as a separate image

2. Place color layer image over the original image with blendMode="normal"
3. Apply colorization for color layer image:

var colorTransform:ColorTransform = new ColorTransform();
colorTransform.color = color;
target.transform.colorTransform = colorTransform;

Results:






Baca Selengkapnya ....

Hello world, universe, etc.

Posted by Unknown Minggu, 17 Juli 2011 0 komentar


Hello friends,
In this blog I will write about my experiments and other interesting stuff in the fields of:
  • Android 
  • Adobe Flex, Adobe AIR
  • User Interfaces Design, Usabilty
Enjoy! :)

Baca Selengkapnya ....
Trik SEO Terbaru support Online Shop Baju Wanita - Original design by Bamz | Copyright of android illegal.