Detecting Double Click in Flash
1. Create a Counter that will keep track of the delay between clicks. A MovieClip can be used as a counter.
2. The Counter itself will check whether the delay has been bypassed or not. If it has, the counter will reset.
3. Create a button large enough to cover the entire scene. This button will listen for Mouse events covering the entire movie area.
4. Create a time delay variable based on the Movie's Frame Rate. If the second click occurs within this delay, it will be treated as a double-click.
5. Create a flag variable containing the value true or false. If at the time of a click, the flag is found to be true, the click will be treated as a double-click.
|» Level Intermediate|
Rating: 5.5 Votes: 4
|College student, 19 years old Intersts - Computers, Sports|
|Download the files used in this tutorial.|
|Download (0 kb)|
|More help? Search our boards for quick answers!|