What is the equivalent of this AS3 code in AS2?
stage.addEventListener(Event.MOUSE_LEAVE, callbackFunc);
private function callbackFunc(e:Event):void {
// do something
}
What is the equivalent of this AS3 code in AS2?
stage.addEventListener(Event.MOUSE_LEAVE, callbackFunc);
private function callbackFunc(e:Event):void {
// do something
}
At first I thought it was just a rollout-
stage.onRollOut = function(){
//the action could occur here
}
This doesn't seem to be working properly... but then again; you could define the stage as a MovieClip(). AS2 is a bit clunky when it comes to this sort of thing. I think most of the solutions would be hacks. I certainly loved how much simpler it was though. :)
You can check _xmouse property to see, if the mouse is not in clip
_root.onMouseMove = function()
{
if(
_xmouse <= 0 ||
_ymouse <= 0 ||
_xmouse >= Stage.width - 1 ||
_ymouse >= Stage.height - 1
)
outCallBack();
}
function outCallback() { bla; }