Checking for doubleclick

You can adjust the time by changing 500 to other values (milliseconds) on(release){ if(lastclick - (lastclick=getTimer()) + 500 > 0){ //do doubleclick action trace("double"); } else { //do singleclick action trace("single"); } }
chu Date: 31/03/2003
ah thanks, much more straightforward than the macromedia method. Amazed this isn't in the standard core.
guest Date: 22/07/2008
great!
trm Date: 19/08/2008
Kudos for this! The best and elegant way of doing doubleclick in Flash Actionscript 2!
steve Date: 15/05/2009
thanks a lot man! you're the hero of todayŽ
Pocca Date: 28/09/2009
Hi Thanks alot! my movieclip finally works! Would u mind explaining the script to me? if(lastclick - (lastclick=getTimer()) + 500 > 0) Thank u very much!
Skyself Date: 11/01/2010
thanx !!!
alex Date: 18/01/2010
nice and easy and works perfect. thanks a lot
Prakash Date: 01/02/2010
thank you very much
Oles Date: 20/04/2011
thank you )))))))))))))))))))))
Add comment
Home