开发者

Find the color of a pixel at a point within a VGroup

I'm having trouble with this code ca开发者_Go百科n anybody help...

var imageMap:ImageSnapshot= ImageSnapshot.captureImage(object);
var pixelValue:uint = imageMap.bitmapData.getPixel(x, y);


According to the documentation, there is no bitmapData property of the ImageSnap class. Instead you can use the static ImageSnapshot.captureBitmapData function to get a BitmapData snapshot of your object.

var imageMap:BitmapData = ImageSnapshot.captureBitmapData(object);
var pixelValue:uint = imageMap.getPixel(x,y);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜