weird!
I have set an inner boundry where if the mouse moves in there, no drag, but if the mouse moves outside the custom bounds, i want to drag the event.target.
" still in bounds " traces are good but then they stop when the mouse goes out of my custom bounds and i never get “startdrag” nor the general traces for the bounds above (which aren’t involved in the logic). The event will stop firing if you go off the item completely so i made a 10px buffer on which to calculate the edge and therefore start the drag. But if you move the cursor around the edge, within that buffer, the else case and the function don’t fire.
Thanks in advance
// the function is dispatched on MOUSE_MOVE Event
private function itemMove(event:Event):void
{
var bounds = event.target.getBounds(this.mainStage);
var T = bounds.top +10;
var B = bounds.bottom -10;
var L = bounds.left +10;
var R = bounds.right -10;
trace(T + " mouse" + mouseY + " " + B);
trace(L + " mouse" + mouseX + " " + R);
if ((T < mouseY < B) && (L < mouseX < R)) {
trace(" still in bounds "); //traces
} else {
trace("startdrag"); // doesn't trace
}
}