Detect the double tap of a button

I am creating an application for very young children and want to keep off the screen of the settings in my game.

I've been planning to do by requiring a double tap on the settings button but do not know how to detect a double tap

The application is for iPad only.

Doubleclickenabled definition will not help in this case, because it only works for textfields in iOS. You can only use a listener MouseEvent.CLICK and take note of the getTimer(). If the new click is less than a certain amount of time since the last one, so it's a double tap. You could go further and make sure that a third tap has come not too soon, otherwise the children could just frantically press the button to get through.

Here's something useful that someone made to measure a number given of taps:

https://github.com/fljot/Gestouch

With this, you can add a listener like this:

var doubleTap:TapGesture = new TapGesture (myButton);

doubleTap.numTapsRequired = 2;

doubleTap.addEventListener (GestureEvent.GESTURE_RECOGNIZED, onDoubleTap);

...

private void onDoubleTap(event:GestureEvent):void

{

handle double tap!

Tags: Adobe AIR

Similar Questions

  • The Double Tap details to reactivate the display.

    Can someone clarify, do bike G4 + equipped Double tap on the screen informed even as awakening motorcycle screen when the phone has eaten taken?

    Noura says:
    Can someone clarify, do bike G4 + equipped Double tap on the screen informed even as awakening motorcycle screen when the phone has eaten taken?

    I saw something on the double tap to wake up. I have not saw it listed as a function, so I guess that the phone doesn't have the sensors for her.

  • How to turn on the Double Tap feature on the mouse pad!

    Good so I used to be able to double tap on the mouse pad, click and I accidentally turned off somehow and I can't for the life of me understand how to re-enable it. Help please!

    In most cases, the controls for it are in the start menu / Control Panel / mouse.  Where varies by manufacturer (computer and mouse) so I can't help you there that you have not provided this information, and even if you don't I probably just refer to manufacturers of assistance.  But before you go watch, read the next paragraph.

    But it turns out that there is another way to set this feature.  Here is the procedure:http://www.vistax64.com/tutorials/40246-single-click-option.html.  It is quite simple and does not involve all the controls of the mouse (and can be changed back as you wish).

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Lost the double tap feature.  How can I reset?

    After a loss of power when I restarted I lost a magic button function.  I used to be able to type slightly twice (not enough to click on the button) to simulate a single click (a full press). I can't find how to reset this option in preferences. How to restore tap double light (not click forced cushion)?

    It is controlled via the mouse or Trackpad preferences. However, a loss of power can damage the HARD drive, so I would like to do the following:

    1. Use disk utility to repair permissions and the HARD drive.
    2. Reinstall OS X.

    Fix the hard disk and permissions

    Boot from your Snow Leopard installation disc. After the installer loads, choose your language and click on the button continue. When the menu bar appears select utility drive in the Utilities menu. After that the charges of THE select your entry from hard drive (mfgr. ID and car size) in the list on the left.  In the status area, you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is faulty or has failed. (State SMART is not reported on external drives Firewire or USB). If the drive is "verified", then select your OS X volume in the list on the left (subentries under the entry for the road), click the first aid tab, then click the repair disk button. If THE reports any errors that have been corrected, and then run repair disk again until no errors are reported. If no errors are reported, click repair permissions . Wait until the operation is complete, then exit FROM and return to the installer.

    If THE reports errors, it cannot be resolved, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you do not have one of them or none of them can fix the disc, then you will need to reformat the hard drive and reinstall the OS X.


    Reinstall OS X without erasing the drive

    1 fix the hard disk and permissions

    Boot from your Snow Leopard installation disc. After the installer loads, choose your language and click on the button continue. When the menu bar appears select utility drive in the Utilities menu. After that the charges of THE select your entry from hard drive (mfgr. ID and car size) in the list on the left.  In the status area, you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is faulty or has failed. (State SMART is not reported on external drives Firewire or USB). If the drive is "verified", then select your OS X volume in the list on the left (subentries under the entry for the road), click the first aid tab, then click the repair disk button. If THE reports any errors that have been corrected, and then run repair disk again until no errors are reported. If no errors are reported, click repair permissions . Wait until the operation is complete, then exit FROM and return to the installer.

    If THE reports errors, it cannot be resolved, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you do not have one of them or none of them can fix the disc, then you will need to reformat the hard drive and reinstall the OS X.

    2 reinstall Snow Leopard

    If the disc is OK then leave FROM and return to the installer.  Proceed to reinstall OS X.  Note that the Snow Leopard installer will not erase your drive or disturb your files.  After installing a new copy of Mac OS X, the installer will move your Home folder, third-party applications, elements of support and network preferences in the newly installed system.

    Download and install Mac OS X 10.6.8 v1.1 updated Combo.

  • Script to detect the moment when a radio button is clicked / digital signature signed

    Good afternoon

    What is the syntax to detect whether a radio button is pressed or a digital signature field is signed?

    What I want to do is to fill in a field if the user clicks a radiobox and the user signs the form doorwindow.

    My radio boxes follow the pattern

    Group name: Group 1

    Name of choice: A, B, C, D

    Field name digital signater: boss

    Script project

    If (Group1. A == {True and this.getField("boss') .signed)

    this.getField("x").value = thisgetField("y").value

    {

    I know that the syntax is far away, but I'm trying to honor a task like thie described above.

    You don't specify what type of field 'x', but assuming that it is a text field, you can use this code as the code customized for her:

    {If (this.getField("Group_1").value == 'A' & {this.getField("boss").value! = ""})}

    Event.Value = this.getField("y").value

    } else event.value = "";

    Be aware that JS is case-sensitive, so if the name of the Group of option buttons is "Group 1" and not "Group 1", you will need to change this in the script.

  • Double tap on the web page does not zoom in, only outside.

    the zoom feature works only if I use the method of pinching two fingers. the double tap does not work for Zoom.

    Could try, after you restart your mobile phone...

    or try with Firefox Beta

    Zoom options

  • Lenovo U31-70 double tap on the touchpad does not work

    Hello

    I just bought a new Lenovo U31-70 with Windows 10 already installed on it. There is a problem with the double tap feature, it does not work. The feature is enabled in the option.

    This model of Lenovo has Alps touchpad driver and I am not able to find the place where activate the double tap on regedit, of workaround works instead if you have Synaptics drivers.

    Who can help me?

    Sorry... I found a solution in a similar topic, admin can close it.

  • How can I disable double tapping on my touchpad?

    I can't seem to find where I turn this option off.  I had turned it off before, and it worked fine.  When I type, my cursor randomly moves to another position on the screen.  I think it's because I hit too hard and you activate the double.  I read a previous QA, and they suggested to turn off the pad when I type.  That works well, but then I do not have access to the pointer.  It is just the double tap I want off.  is this possible?

    Hello ForeignDust,

    Thank you for posting.  I think I might have a solution for you.  You can accelerate the speed of double tap so that requested the touchpad to be double typing really fast to activate.  I've included the steps to change this below.

    Change the settings of the mouse

    You can customize your mouse in a variety of ways, for example, the permutation of the functions of the buttons on your mouse, making it more visible mouse pointer and change the speed of scrolling wheel.

    Please let me know if this helps you.

    To change the operation of the mouse buttons

    1. Click to open the mouse properties.

    2. Click the button and then do one of the following:

      • To change the functions of the left and right mouse buttons, select the switch primary and secondary buttons check.

      • To change the speed at which you need to click the buttons to perform a double click, move the slider of the double click to fast or slow speed.

      • To enable the ClickLock, which enables you to highlight or drag without hold down the mouse button, select the enable the ClickLock check box.

    Zack
    Engineer Microsoft Support answers visit our Microsoft answers feedback Forum and let us know what you think.

  • Touchpad not working not - corner double tap does not work - no yellow light

    I have a Folio 9470 m.

    My touchpad does not work.

    The tip of the double tap does not work.

    The yellow light is not on.

    Someone at - it help him?

    Press the power button and then immediately press the ESC key to call the start menu.

    In the boot menu, press the F2 key to enter the PC Diagnostics.

    Select the component tests , then the mouse. Run the test. If she passes the test then the touchpad is fine and all that should be required is reinstall the driver for the touchpad. You can download the software from your support of the ultrabook Portal in the download section. Download and install the appropriate version of the operating system.

    If the led on the touchpad of orange does not illuminate, the touchpad is enabled. Amber led on the means, the touchpad is disabled, disabled.

  • How to use the same script for several buttons

    Hello

    I have just started using flash if any help would be great!

    I create a blockbuster game, I have a grid of 20 buttons and I need (individually) to turn blue on red and click double click. I managed to do it with the first using this code;

    --------------------------------------------

    var click: Boolean = false;

    BN1.addEventListener (MouseEvent.CLICK, bn1click);

    function bn1click(event:MouseEvent):void {}

    clicked = true;

    var newColorTransform:ColorTransform = bn1.transform.colorTransform;

    {if (clicked)}

    newColorTransform.color = 0 x 064258;

    }

    BN1. Transform.ColorTransform = newColorTransform;

    }

    /////////////

    BN1.doubleClickEnabled = true;

    var doubleclicked:Boolean = false;

    BN1.addEventListener (MouseEvent.DOUBLE_CLICK, bn1dclick);

    function bn1dclick(event:MouseEvent):void {}

    DoubleClicked = true;

    var newColorTransform:ColorTransform = bn1.transform.colorTransform;

    {if (clicked)}

    newColorTransform.color = 0xac1e23;

    }

    BN1. Transform.ColorTransform = newColorTransform;

    }

    --------------------------------------------

    Now, I'll have trouble doing the same thing to work for the rest of the buttons, they are each named bn2, bn3 etc. They need to work individually and stay blue/red when clicked. I tried to list them as addEventListener orders but not with not a lot of success!

    Any help would be greatly appreciated, thank you!

    Tomo

    To do this is to use arrays to follow the buttons and their properties.

    var buttonList:Array = new Array (bn1, bn2, bn3);

    var clickedList:Array = new Array();

    var doubleClickedList:Array = new Array();

    Then use a loop for to assign functions and properties for each button:

    var thisMany:int = buttonList.length; This will give you the number of items in the buttonList array

    for (var i: int = 0; i

    buttonList [i] .addEventListener (MouseEvent.CLICK, btnClick); assign the function click on each button

    buttonList [i] .addEventListener (MouseEvent.DOUBLE_CLICK, btnDClick); assign the double-click function

    clickedList.push (false);  Add a value of false for each key in this table

    doubleClickedList.push (false);

    buttonList [i] .doubleClickEnabled = true; Set the property of double-tap for each button

    }

    function btnClick(event:MouseEvent):void {}

    var thisButton:int = buttonList.indexOf (event.target);  know which button has been clicked as an element in the table

    clickedList [Ceboutonselectionnel] = true;  Change the value in the table

    var newColorTransform:ColorTransform is buttonList [Ceboutonselectionnel].transform.colorTransform;.

    {if (clickedList [thisButton])}

    newColorTransform.color = 0 x 064258;

    }

    buttonList [Ceboutonselectionnel].transform.colorTransform = newColorTransform;

    }

    function btnDClick(event:MouseEvent):void {}

    var thisButton:int = buttonList.indexOf (event.target);

    doubleClickedList [Ceboutonselectionnel] = true;

    var newColorTransform:ColorTransform is buttonList [Ceboutonselectionnel].transform.colorTransform;.

    {if (doubleClickedList [thisButton])}

    newColorTransform.color = 0xac1e23;

    }

    buttonList [Ceboutonselectionnel].transform.colorTransform = newColorTransform;

    }

    Now you can have any number of buttons, just add their instance names in the table above.

  • DataGrid detect SINGLE/DOUBLE mouse click

    Hello

    I know that datagrid can detect changes in the mouse right-click

    Add listener

    myDataGridList.addEventListener (Event.CHANGE, myDataGridListChange);

    public void myDataGridListChange(e:Event):void {}

    trace (myDataGridList.selectedItem.id);

              }

    but they can detect the double mouse click?

    My goal to do that is, if the user double clicks on a row of datagrid, I need me return the value of myDataGridList.selectedItem.id, while I am able to continue to proceed to the next step in my game.

    Thank you

    -Zainuu

    You must activate your datagrid receive doubleclick events:

    myDataGridList.doubleClickEnabled = true;

    myDataGridList.addEventListener (MouseEvent.DOUBLE_CLICK, f);

    function f(e:MouseEvent):void {}

    //

    }

  • Is there a configuration setting to turn off the zoom double tap? I need to be able to send a true double tap to a java applet. Thank you!

    Details in the question above. Thank you!

    Yes, the meta tag will stop and zoom will allow double-taps to receive by JavaScript. However, it will prevent all the zoom, including pinch zoom, which could be a bad thing.

    I'll start working on an add-on "zoom options" very soon and post an update here when it's ready.

  • What is the difference this 2 examples of photos? Use function IMAQ detect circles to detect the GREEN button.

    Hi all

    Please refer to the attached 2 pictures, they are similar, just the size is defferent. (pass PNG, 5478 pass. PNG).

    But now I try to use IMAQ detect circles to catch the GREEN button. For the PNG pass, it works very well, but for another example, it is still does not detect this button.

    I also try to change the curve settings and note that entry, but still no. Another way, I also try to use function IMAQ find circles , but the result is worse that IMAQ detect circles, so give up.

    The code is detect the circles.png, copy of block diagram.

    So what is the root cause? Thanks for help.

    Hi colinzhang,

    The extraction of curve so it uniform mode, you can get the result.

    -Suggestion, if you want to use the entire image area as KING should get the size of the image, get the rectangle and convert it to the descriptor of KING. (I think this is unnecessary)

    -Be careful with the extraction of the plane, u use default color which is the Red plan. In this example, it is fine. but make sure you know what aircraft you are extracting.

    s ' Please find vi saved in the 2010 version.

  • Zest of Acer more: is it Double tap to wake the screen system?

    Hello

    Is there double tap on the Acer more zest to Wake up then screen or just drag it down to one screen (such as Acer Z630) to wake up?

    Sory for my bad English

    No Double don't tap on Acer more zest, just slide down.

  • Double tap to sleep at the home screen does not

    Follow-up to the command prompt and set the switch to 'works '.

    This feature works only if the lock screen and password is enabled (what I chose to do not)?

    Please tell us what I have to do to make this work.

    Just figured it out: while in "tap to wake" I can use the different number of intervals (i.e. the time between the two keys) to activate the function, 'tap to sleep' will not accept a specific interval of work: if I double tap to 50 milliseconds too fast or too slow, it won't work.

Maybe you are looking for

  • GB storage info

    I have an IPod old Nano with 8 GB of storage, which I have about 1.7 GB free. I like to keep track of how many GB of files of song is when I add them so I don't miss about the room, but I can't find anything in ITunes that tells me that this info - m

  • How to recover the Satellite A200-1KZ?

    Hello. I m from Spain. So excuse me for errors I could do in that language. Well, I bought this phone and I m very happy with it. But recently I had a problem. The issue is that I m a user of linux but use windows to play games and similar. The fact

  • HP G72-259wm: white screen

    I have a white screen when I start my HP G72. The fan works and the lights on the keyboard work. I tried the hard reset without the battery and still nothing. I would like to connect the computer to my TV to see if that works but you read the setting

  • USB ports on the Satellite P10-340 does not

    On Christmas day, my son had problems loading PC games on my laptop. After several attempts, he gave up eventually pointing upwards. During an attempt, he started typing on the keyboard and by dragging the mouse in all directions in anger. As it happ

  • Not impressed by Siri

    So far, it has been very good. Tonight I want to rent the movie of 1938 'holiday', staring Katherine Hepburn and Cary Grant, which is located in the iTunes Store. So this afternoon I thought I would check it out. I said 'find the holiday '. I had a s