Limit Drag&Drop Area in Mask
hi , i have medium map image and i want to show this in a specific Frame (border)
i cant Resize and Decrease my map image cause the font cant be read so i decided to put this image in a mask Area and use Drag function so user can See whole of image with Draging
i use mask technic , convert my image to movieclip with instance name : map_mc
and then put this script :
map_mc.addEventListener(MouseEvent.MOUSE_DOWN, drag);
map_mc.addEventListener(MouseEvent.MOUSE_UP, drop);
function drag(event:MouseEvent):void {
map_mc.startDrag();
}
function drop(event:MouseEvent):void {
map_mc.stopDrag();
}
it works but the problem is : i can move and drag my image till all of image goes out of my mask area ( nothing see , only white screen) , so how can i limit this area and make Drag Function works only when Reachs the Edges of image ( Top , down , Right , Left ) /
