Results 1 to 2 of 2

Thread: Some swf's detect the absence of the mouse, some don't?

  1. #1
    Join Date
    Apr 2008
    Location
    San Diego, CA
    Posts
    352
    Thanks
    57
    Thanked 6 Times in 6 Posts

    Default Some swf's detect the absence of the mouse, some don't?

    Check out these two sites:

    http://ballhonda.autofusion.com/
    http://www.ljari.com/test/

    Both of them have some kind of Flash navigation at the top, and both are using the exact same AS2.0 script for each menu item. Both are also using swfobject 2.1:

    Code:
    onClipEvent (enterFrame) {
    	if (this.hitTest(_root._xmouse, _root._ymouse, true) && this._currentframe<this._totalframes) {
    		this.nextFrame();
    	}
    	if (!this.hitTest(_root._xmouse, _root._ymouse, true) && this._currentframe>1) {
    		this.prevFrame();
    	}
    }
    Right click on the Flash and then click somewhere else on the page (but keep your mouse still), to trick Flash into thinking the mouse is still hovering over a menu item. Now move your mouse. At the Ball Honda site, the swf recognizes that the mouse has moved outside the bounds of the movie and the menu items will return to normal. At the LJARI site, you can move your mouse as much as you want, but it will never detect that the mouse has left the Flash movie.

    Like I said, both are using the same script. Anyone have any ideas why one would detect the absence of the mouse and the other wouldn't?

    Thanks.

  2. #2
    Join Date
    Apr 2008
    Location
    San Diego, CA
    Posts
    352
    Thanks
    57
    Thanked 6 Times in 6 Posts

    Default

    I found through google that AS3 has built-in stuff to detect when the mouse has left the movie, but I can't find anything about this sort of automatic hit-or-miss detection that I'm experiencing.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •