A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: simulating a double-click

  1. #1
    Senior Member
    Join Date
    Jan 2004
    Posts
    171

    simulating a double-click

    Hi

    As far as I can see, the double-click event is not available as an option for buttons or clips used as buttons.

    Is there a standard way of simulating a double-click ? I need to use the simple on(release) event for a drag and drop

    thanks

  2. #2
    Senior Member Cass101's Avatar
    Join Date
    Dec 2004
    Posts
    131
    never tried it myself, but there are a few examples here on flashkit that may/may not help.

    here's one i picked out quickly:
    http://www.flashkit.com/tutorials/In...-666/index.php

    or here's the search results:
    http://www.flashkit.com/search.php?t...page=1&x=0&y=0

    hope this helps.

  3. #3
    Senior Member
    Join Date
    Jan 2004
    Posts
    171
    hi

    i'd kind of come to the same conclusion : using a milliseconds time difference to detect a double click

    but i'd thought i'd check first to see if there was a simpler way

    thanks


  4. #4
    Senior Member
    Join Date
    Jan 2005
    Posts
    110
    button.onPress = function() {
    if ((getTimer()-lastClick)<500) {
    //put anything for double click;
    } else {
    lastClick = getTimer();
    }
    }

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