View Full Version : Releasing the Mouse Outside the SWF
tsNoah
April 20th, 2004, 04:41 PM
I have been working on this vrTour viewer as my learning project for flash and pretty much have the thing complete... However, one thing I'm interested in doing is making it continue the onMouseDown command until the user releases the mouse button regardless of if the pointer is over the swf or is outside of it.
The way it works now im simply doing a this.onMouseDown/MouseUp on the first frame of layer 1 to capture the mouse clicks.
Any ideas?
Jerryscript
April 20th, 2004, 05:04 PM
I don't believe flash can detect mouse events outside the movie.
Perhaps javascript could work.
Clown Staples
April 20th, 2004, 05:21 PM
yes it can!
but only onmouseups, and onmousemoves,
and only if the downclick before the drag was on the flash file.
You can test it, but basically, if you click on the flash, it can capture movement mouse events until the next mouserelease. That is the only reason the zebra (http://www.kirupaforum.com/entries/clown.htm) game worked.
The 40 by 200 or whatever it was footer size was way too small to expect anyone to navigate within, so i made it so you have to click and drag to steer.
That way i could to let you use your full screen space to steer within.
Danii
April 21st, 2004, 07:35 AM
this.onPress = function()
actions here;
}
this.onRelease = this.onReleaseOutside = function() {
more actions;
}
That worked for me... :)
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.