jlizarraga
08-12-2008, 04:34 PM
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:
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.
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:
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.