A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Single click , double click ????

  1. #1
    Junior Member
    Join Date
    Jun 2001
    Posts
    8
    I desparately need to use double click.
    I had a few suggestions but I still can not make it work.
    If you know how to do it please explain having in mind that you are explaining to a newbie.
    What I want to do is:
    if I click ones to gotoandStop(x)
    if I double click to gotoandStop(y)
    Thanks
    Sasaka

  2. #2
    Senior Member
    Join Date
    Feb 2001
    Posts
    475
    Hi

    here's some code to check if it was doubleclicked... put your code what should happen when doubleclicked in {} brackets after the first if statement. And set a variable "clicked = 0;" in the main timeline.

    Code:
    on (press) {
    temp = getTimer();
    if (temp - _root.clicked < 500)
    	trace ("doubleclicked");
    else
          trace ("single click");
    _root.clicked = temp;
    }
    Hope this works for you.

    Yours
    HTD

  3. #3
    Junior Member
    Join Date
    Jun 2001
    Posts
    8
    Thanks a lot.
    I don't really know what I am doing wrong but eventially I may be ablw to make it work.
    Sasaka

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center