Yordan Yanakiev
Yordan Yanakiev

Reputation: 2604

Flex Change image color dynamically?

I have a image declared like the following:

[Bindable]
[Embed( source="assets/banana.png" )] 
public var iconBANANA : Class;

It is involving into itemRenderer, but I wish to change the color of the image when some event occurs (like clicking above or something).

The rest of the objects used the image shall remain unchanged, only the object on which the event has occurred shall change the color of the image.

But the biggest question is :

Upvotes: 0

Views: 1524

Answers (2)

J_A_X
J_A_X

Reputation: 12847

I believe what you're looking for are Filters. What you're explaning (changing one color to another) is not exactly trivial and going into some fairly complex image manipulation but you can get some results using the ColorMatrixFilter.

Upvotes: 1

cwallenpoole
cwallenpoole

Reputation: 82028

You're looking for beginBitmapFill.

Upvotes: 0

Related Questions