开发者

How to change the color of a DisplayObject when it moves in a specific zone?

开发者 https://www.devze.com 2023-03-06 17:28 出处:网络
I am coding a graphical interface using Flex, and I have a qestion related to masks in Flash. I want to create a kind of mask that defines which color and which alpha value a text will have according

I am coding a graphical interface using Flex, and I have a qestion related to masks in Flash.

I want to create a kind of mask that defines which color and which alpha value a text will have according to its position on the screen. It is very easy to do that with the text being the mask of a bitmap, for instance.

However, I also want to take into a开发者_运维百科ccount the color of the text itself.

For instance, if I create a red text, in some zone it will be red with a modified alpha value, but on another zone, the text will be full white, as if there was a kind of mask which also applies its own color on top of it.

Is there a way to easily do this kind of thing?

Of course, I can manually apply the format on the text according to where it is, but I wonder if there is an automatic processing like mask or blend mode using a DisplayObject as a processing pattern.

Thank you!


Personally, I would have states in my component that changes color, and have something be able to set those when your component rolls over your 'section'.

0

精彩评论

暂无评论...
验证码 换一张
取 消