var isMouseDown:Boolean=false;
var oldX:Number;
var oldY:Number;
mcq.addEventListener(MouseEvent.MOUSE_DOWN,onMouseDowns);
mcq.addEventListener(MouseEvent.CLICK,onClick);
function onClick(evt:MouseEvent):void {
if (isMouseDown) {
return;
}
mc.visible = true;
}
function onMouseDowns(evt:MouseEvent):void {
oldX=mcq.x;
oldY=mcq.y;
isMouseDown=false;
mcq.startDrag(false);
mcq.addEventListener(MouseEvent.MOUSE_UP,onMouseUps);
}
function onMouseUps(evt:MouseEvent):void {
if (!(oldX==mcq.x&&oldY==mcq.y)) {
isMouseDown=true;
}
mcq.stopDrag();
mcq.removeEventListener(MouseEvent.MOUSE_UP,onMouseUps);
}