Richard Kilmer wrote:
In ActionStep Scott Hyndman has built a set of custom cursors. This is VERY
cool when you are over the swf but is there a way we can hide the
cursor when the "real" cursor leaves the swf? Is there any notification of mouse exit? This must not rely on javascript, but be intrinsic to Flash itself.

Thanks,

-rich


Create a button the size of the movie and place it on the bottom most layer. Add a mouseRolledIn() and mouseRolledOff() call to every button in your movie.

var userLeftID:Number;

function mouseRolledIn():Void {
  // Called from every button and will
  // cancel the userReallyLeft call.
  clearInterval(userLeftID);
}
function mouseRolledOff():Void {
  // Called from every button and will
  // inform the movie that the user left after
  // waiting 200 milliseconds.
  userLeftID = setInterval(userReallyLeft, 200);
}
function userReallyLeft():Void {
  // Whatever you want
}

Basically, it tries to call the userReallyLeft() function on every button rollOut. However, if you rollout of one button and into another it cancels the userReallyLeft() call. userReallyLeft() only ever gets called if you roll off your movie.

I've been using this in banner ads where the number of buttons the movie contains are minimal so this solution was pretty manageable.

I'd be interestedin knowing if anyone came up with any other solutions to this.


JOR


___________________________________
===  James O'Reilly
===
===  SynergyMedia, Inc.
===  www.synergymedia.net

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to