I have a function that triggers every mouse down event when the mouse pointer is on the image. Now, I call two functions in this mouse-down function.
I need a function The last time only means that the interval of 3 seconds or more continuously should be between Below is my code: If I click on the image 5 times continuously and then pause for 3 or more seconds, How to get it? Something that should solve your problem, time expiration is allowed on each call and otherwise ImageCalculation starts after three seconds. Triangulate () every time and second
ImageCalculation () last time only.
img_mouse_down () function calls.
function img_mouse_down () {if (leftMouseButton) {Triangulate (); // Call this function every time ImageCalculation (); // Call this function only last time}}
Triangulate ( ) should be called 5 times and
ImageCalculation () should be called only once.
var timer = null function img_mouse_down () {if (leftMouseButton) {Triangulate (); (Timer! == Faucet) {Clear Timeout} Timer = Set Timeout (function () {Image Seculation ()}, 3000)}}
No comments:
Post a Comment