Articles Archive
Articles Search
Director Wiki
 

mouseDelta

December 4, 1997
by Alex Zavatone

One thing that is very lacking in Director is the capability to track the mouse position and the mouse delta from a location. Facing the need for such a tool yesterday, I cooked up a simple MIAW (Mac or Windows) in Director 6 which is capable of showing relative mouse position from the point that you set. How do you set the desired point you ask? Simply position the mouse where you want and press control. Then move the mouse to the location you desire and press control again. The distance the mouse travelled from the "origin" is printed out to the message window so you can copy it and paste it where ever you want.

I'm using this tool to help me record values for a routine that will place graphical elements in a window via lingo but it can be used to display how far elements are from each other and how far a graphic is dragged. Hope you find it useful.

Note: thanks to Colin Holgate the MouseOrigin movie now shows the total distance from the original point as well as the h and v distances.  For those concerned with accuracy, the distance is calculated as the square root of the sum of the squared h and v distances.  But then you knew that didn't you?

A Director user since 1987, Alex (Zav) Zavatone has worked on the engineering teams for both Director and Shockwave, 4, 5, 6 and 7. Recent investigations find him developing foundation classes for Director with asynchronous process management and other life threatening activities. In its early days, he had something to do with this Internet thing known as "DOUG". A noted ne'erdowell, slacker and laggard, Mr. Zavatone is nonetheless is trusted by children, small animals and the elderly. In his spare time, Mr. Zavatone rehabilitates lame desert trout.

Copyright 1997-2017, Director Online. Article content copyright by respective authors.