要在得到你的影片剪辑颜色某些点或范围,您应该创建一个所需容量的透明BitmapData(1x1代表点),填充0x0颜色,然后创建一个将BitmapData对齐(0,0)到您的区域左上角的变换矩阵,然后绘制MC在位图上,那么你可以查询它的像素。一个例子(点):
private static var hitTestBD:BitmapData=new BitmapData(1,1,true,0);
private static vat hitTestMatrix:Matrix=new Matrix();
public static function getMCColor(mc:DisplayObject,tx:Number,ty:Number):uint {
hitTestMatrix.identity();
hitTestMatrix.translate(-1*tx,-1*ty); // aligning
hitTestBD.fillRect(hitTestBD.rect,0x0);
hitTestBD.draw(mc,hitTestMatrix);
return hitTestBD.getPixel32(0,0);
}
如果你的'MovieClip'只有一个(固体)颜色,然后使用'ColorTransform'。 –