NO, ma qusta è una soluzione di peter hall:
codice:
onClipEvent (load) {
width = 640;
// stage width
height = 400;
// stage height
/* extrapolation parameter:
* Low value (ie <1) = decrease chance of returning out when in
* High value (ie >1) = decrease chance of returning in when out
*/
extrap = 1;
//-------------------------------//
pointerOut = false;
x0; x1; y0; y1; dx; dy;
}
onClipEvent (enterFrame) {
x1 = _level0._xmouse;
y1 = _level0._ymouse;
if (x1 == x0 && y1 == y0) {
// pointer movement not detected
// extrapolate to find expected mouse pos and test for inside/outside
if (x1 + extrap * dx < 0 || x1 + extrap * dx > width || y1 + extrap * dy < 0 || y1 + extrap * dy > height) {
pointerOut = true;
}
} else {
pointerOut = false;
dx = x1 - x0;
dy = y1 - y0;
x0 = x1;
y0 = y1;
}
}
Poi puoi verificare la posizione tramite javascript, o tramite un pulsante sullo stage. 1000 modi, ma nessuno sicuro..