tangdelphi
private function init(e:Event=null):void
{
var sp1:Sprite=new Sprite();
sp1.graphics.beginFill(0xFF00FF);
sp1.graphics.drawRect(100,100,200,200);
sp1.graphics.endFill();
addChild(sp1);
sp1.addEventListener(MouseEvent.CLICK,onSp1);
var sp2:Sprite=new Sprite();
sp2.graphics.beginFill(0xFFFF00);
sp2.graphics.drawCircle(200,200,100);
sp2.graphics.endFill();
addChild(sp2);
sp2.mouseEnabled=false;
sp2.addEventListener(MouseEvent.CLICK,onSp2);
}
protected function onSp2(event:MouseEvent):void
{
// TODO Auto-generated method stub
trace("onClickSp2");
}
protected function onSp1(event:MouseEvent):void
{
// TODO Auto-generated method stub
trace("onClickSp1")
}