In my movie, I want to depress the mouse button and run
certain commands dependent on the amount of time the mouse has been
depressed. For example, if the mouse has been depressed for 3
seconds do this and if for 5 seconds do this.
It would appear I would use the getTimer script to determine
the amount of time, but how would I write the code? Also, would I
need to setup variables in the code?
Any tips to point me in the right direction would be helpful
when the mouse is depressed start a loop (onEnterFrame or
setInterval would both work) and assign startTime = getTimer()
(only done when startTime is undefined). then compare getTimer()
with startTime to determine what should be done if that difference
exceeds certain times. when the mouse is released re-initialize
startTime to be undefined.