Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, I'd like to have an event oc

Status
Not open for further replies.

adamr1001

MIS
Jul 25, 2001
166
CA
Hi,

I'd like to have an event occur when my mouse is on the Flash stage, and another event to be trigger when the mouse goes off.

I have tried a large button covering the whole stage, and i have tried defining the x,y, coordinates in if statements. both methods work, but not very well. they arenot precise enough: if i move my mouse quickly away, flash does not accurately measure if i am within the boundary or not.

any advice for a better method?

thanks!
 
why not use for the button

on (rollOver){
//what you want
}

and

on (rollOut){
//what you want
}
 
because as i mentioned in my first post, it is not very precise. if you move your mouse quickly off the swf stage - the button does not respond with the percision i require.
 
well i dont know if this will be any better but

myHandler = new object ();
myHandler.onMouseMove = function () {
//actions according to mouse x,y
}
Mouse.addListener(myHandler);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top