简体   繁体   中英

Can I colorTransform a MovieClip but exclude specific sub-components?

Scenario:

I have floating islands that move around in odd paths. There are torches (nested movieClips) mounted on some of the islands. Sometimes a weather effect will change the color and brightness of the islands. Is there a way to change the brightness of the islands (parent movieClips) without also changing the brightness of the torches (child movieClips)?

===================================================

One solution that I can conceive is independently color adjusting all the child objects of each movieClip, instead of adjusting the parent object. This seems highly inconvenient and unnecessary though, so any thoughts would be appreciated.

No, if you need to exclude some parts of a movie clip (or other DisplayObjectContainer ) from alteration applied to their parent, you need to rework your container structure. You can try applying a reverse operation to selected children (say, inverse color transformation), but note that not every transformation can be correctly inversed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM