Search tutorials
Detecting Double Click in Flash
The logic
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 |
|
Added: 2006-04-03 Rating: 5.5 Votes: 4 |
| » Author |
| College student, 19 years old Intersts - Computers, Sports |
| » Download |
| Download the files used in this tutorial. |
| Download (0 kb) |
| » Forums |
| More help? Search our boards for quick answers! |
-
You must have javascript enabled in order to post comments.


Comments
There are no comments yet. Be the first to comment!