检测掩码填充as3

时间:2015-03-10 20:50:12

标签: actionscript-3 mask fill

如何检测我的面具是否填充了约90%?这是我的绘图代码。

var my_shape:Sprite = new Sprite();
var bitmapData:BitmapData = new BitmapData(shida.width, shida.height);
bitmapData.draw(shida);
shidaq.addEventListener(MouseEvent.MOUSE_MOVE, draw);
function draw(e:MouseEvent):void {
    addChild(my_shape);
    my_shape.mask = shida;
    my_shape.graphics.beginFill(0xA7A9AC,1);
    my_shape.graphics.drawCircle(mouseX, mouseY, 40);
    my_shape.graphics.endFill();
}

0 个答案:

没有答案