开发者

How to find the color under the mouse in AS3

So, this article looks at how to get the color from an image in AS3, and one开发者_开发百科 of the answers suggests a better way to grab colors using the 'draw' function of a BitmapData object. But these are somewhat limiting, I'm trying to implement an eyedropper-type utility and need to be able to know what color the user is seeing at a certain pixel.

I've tried using draw() on the stage, but that doesn't include anything that's a child of the stage. Next, it occurred to me that I could just look at the children of the stage to find the foremost one that's under the mouse, and draw() that, but then we suddenly get into a possibly time consuming recursive search. does anyone have any better ideas? The simplest/fastest/best way to find what color is being displayed under the mouse in Actionscript 3.


I believe you want this stack overflow question:

Best way to get the color where a mouse was clicked in AS3

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜