-
- private function mouseDownHandler(evt:MouseEvent):void
- {
- if(evt.currentTarget is SceneObject)
- {
-
-
- var bmd:BitmapData = new BitmapData(evt.currentTarget.width,evt.currentTarget.height,true, 0x00000000);
- bmd.draw(evt.currentTarget as SceneObject);
-
-
-
-
-
-
-
-
-
-
- var ptoint = new Point(evt.localX,evt.localY);
- if(bmd.hitTest(new Point(0,0),0x00000001,pt))
-
-
- {
- trace("按下,在内部");
- bmd.dispose();
- }
- else
- {
- trace("按下,不在内部");
- bmd.dispose();
- return;
- } }
- evt.stopPropagation();
- }
as3 判断鼠标在非透明区域点击图片
原文:https://www.cnblogs.com/lingLuoChengMi/p/9264480.html