A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: double-click (I know it's possible, but how?)

  1. #1
    Junior Member
    Join Date
    Oct 2000
    Posts
    2
    For an example of what I am attempting, Please check:
    http://ecko.com/complex

    Nice, right.
    So far I have made a custom cursor.

    Now, how do I script a double click event that goes to the interface movie clip???

    I know you know...please help

    Sasha Bad

  2. #2
    FK Supermodel laxmi19885's Avatar
    Join Date
    Jul 2001
    Location
    Mumbai
    Posts
    474

  3. #3
    Junior Member
    Join Date
    Oct 2000
    Posts
    2

    Wink thank you

    thanx...i will let you know how it works!

    Sasha Bad

    Originally posted by laxmi19885
    one way

    check this
    http://www.were-here.com/forums/show...threadid=70059

    thanx

  4. #4
    Senior Member
    Join Date
    Jun 2001
    Location
    Virginia, USA
    Posts
    437

    Flask Kit rules!

    Code at were-here, script on MC
    Code:
    onClipEvent (mouseDown) { 
    if (this.hitTest(_root._xmouse, _root._ymouse)) { 
    if (!click) { 
    click = 1; 
    startTimeCount = 1; 
    } else { 
    click = 2; 
    } 
    } 
    } 
    onClipEvent (enterFrame) { 
    if (startTimeCount) { 
    startTimeCount += 1; 
    } 
    if (startTimeCount>5) { 
    startTimeCount = 0; 
    if (click == 1) { 
    _root.gotoAndStop("scene3"); 
    } else if (click == 2) { 
    _root.gotoAndStop("scene1"); 
    } 
    click = 0; 
    } 
    }

    Script on button
    Code:
    on (press){
    	if (click == 0){
    		click = 1;
    		timer = getTimer();
    		msg = "Single click";
    	} else if (click == 1){
    		if ((getTimer() - timer) < 500) {
    			click = 0;
    			msg = "Double click";
    		} else {
    			timer = getTimer();
    			msg = "Single click";
    		}
    	}
    }
    No need to create movie clip, just make it as a button.

    Sample:
    http://www.tuongky.com/flashhelp/double_click.html
    http://www.tuongky.com/flashhelp/double_click.fla

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