Using getColorBoundsRect in AS3

I have been experimenting with the getColorBoundsRect function in Flash, with interesting results. This is a really powerful tool. It allows us to analyze the colour information on the stage and isolate specific colors. In this example I am am finding all the red within the image and replacing it with green. It may not be the prettiest example, but it shows you exactly what I mean.

It’s not as simple as telling flash to find all the red, but rather it determines the region that it is in, afterwards I then subdivide that region into smaller sections and then analyze it again. This repeats until it has only the red.

Just click the analyze button and wait a second while it determines where the red is.

You can contact me on Twitter.

Recent & Popular Articles

Browse All >