元件的拖动

mc.buttonMode=true;//设置鼠标手型
mc.addEventListener(MouseEvent.MOUSE_DOWN, tuo);

function tuo(event:MouseEvent):void {

	mc.startDrag();

}

mc.addEventListener(MouseEvent.MOUSE_UP, ting);

function ting(event:MouseEvent):void {

	mc.stopDrag();

}

 

 

 

 

------------------------------------------------------------------------------------

你可能感兴趣的:(元件的拖动)