【as3手册小记】遮罩显示对象
// 以下代码假设它正在显示对象容器// (如 MovieClip 或 Sprite 实例)中运行。import flash.display.Shape;// 绘制正方形并将其添加到显示列表中。var square:Shape = new Shape();square.graphics.lineStyle(1, 0x000000);square.graphics.beginFill(0xff0000);square.graphics.drawRect(0, 0, 100, 100);square.graphics.endFill();this.addChild(square);// 绘制圆并将其添加到显示列表中。var circle:Sprite = new Sprite();circle.graphics.lineStyle(1, 0x000000);circle.graphics.beginFill(0x0000ff);circle.graphics.drawCircle(25, 25, 25);circle.graphics.endFill();this.addChild(circle);function maskSquare(event:MouseEvent):void{square.mask = circle;circle.removeEventListener(MouseEvent.CLICK, maskSquare);}circle.addEventListener(MouseEvent.CLICK, maskSquare);?