Timing how long a button is pressed for

Hi all. I was wondering if I could get help on this topic. I am trying to find a way to have a button to go directly to a certain range relies on, but then also jump to a different image if the button is held down for a certain period of time, say 2 seconds. I guess I should use the Timer() function. My logic is as follows;
{We (Press)}
Start timer()
If timer() == 2 dry
gotoAndStop (frame15);
ON THE OTHER
Stop (picture 37);
}

any suggestions?

Thanks for the advice of Craig Grummitt, you pushed me to find the answer on my own, somewhat like the son miagi trained the young grasshopper. :-)

Stop();

var timer: number;
var counter: Number;

XM1.onPress = function() {}
counter = 0;
Timer = setInterval (startTimer, 2000);
}

function startTimer() {}
clearInterval (timer);
counter = 1;
gotoAndStop (10);
}
XM1.onRelease = function() {}
if(Counter == 0) {}
gotoAndStop (5);
}
clearInterval (timer);
}

and ty to CLbleech

Tags: Adobe Animate

Similar Questions

  • How long the images are licensed for a 10 image by / month subscription? Is it 1 month or permanent? Why is there a button next to my picture saying ' license ' again '?

    I would like to learn more about registration terms and conditions:

    -How long the images are licensed for

    -do I need a license

    -Why is there a button next to my picture saying "license again.

    Hi Fiona

    You don't need an extended license if you use the images on a Web site for purposes of decoration and display.

    Yes, a photo credit is required for the mentioned scenarios.

    Thank you

    Bev

  • I have, just, paid, for, one, monthly, how, long ago, in fact, she, for take, LR and PS, to, work?

    I have, just, paid, for, one, monthly, how, long ago, in fact, she, for take, LR and PS, to, work?

    I have a receipt from paypal for payment, do you want the order of point number?

  • How long should I first wait for 6 sec cooldown

    I have 6 new s, so I don't know how to use the first load and how long is it responsible?

    There is no required loading time. You can reload at any time for any period of time. You can use it while it loads.

  • How long do you normally wait for reviewing the files?

    Hi, I'm new here and have a couple of files that have been waiting a week for review.

    So I was wondering how long it normally takes

    It is said ""thank you for your presentation, your files will be examined by the moderation team in the coming days. " "

    Thank you

    Doug

    Hello Doug,

    I found that your account has not been validated when it was created as an important step was missed. I fixed that for you so your content should be placed at the top of the queue and is discussed shortly.

    Kind regards

    Mat Hayward

  • How long will take in charge for screens thunderbolt last since they are discontinued?

    Lightning displays are abandoned. If we were able to buy today, how much more would support last?

    As long as the guarantee. But it's a moot point. I had my TD for three years without incident.

  • Can I use a single purchase of Acrobat software on several computers? I'm working on a desktop computer, laptop and netbook.  Do I have to buy several copies or what?  (PS - if I start with a free trial download, how long can it be used for?)

    How many times can I use Acrobat Pro on my three compters - top of desktop, computer laptop, the net accountant.  I have to make multiple purchases?

    Hi markala,.

    According to the end-user license agreement, a single purchase of retail for Acrobat license is good for 2 computers.

    If you want to install it on 3 machines you need to acquire a volume license.

    Kind regards

    Rave

  • How long the license key latest for Windows Vista

    The other day a person allegedly from Microsoft phoned to tell me that my activation license has expired and that my computer has been damaged by a virus that kept sending error messages. As my license has expired, they were not able to fix the problem and I had to pay £70.00 to renew and to help more of them, otherwise my PC was getting more slower and slower all day. I hung up. But it got me thinking, it was a spam?

    All the Licenses for Windows retail (including upgrades) are transferable to the new machines (in the case of an upgrade it will still a qualifications base on the new machine license) and are actually eternal - at least until there is no material more around which it will run.

    OEM licenses are locked to the first machine on which they are turned on - but finally done as the motherboard (and the replacements of vices).

  • How long HP will offer drivers for DV7 4160em?

    I noticed it's no new drivers for my laptop of 2010 last updated so that it is 2011, I wander if they publish even new drivers for my graphics card AMD M880G with ATI Mobility Radeon HD 4250 and ATI Mobility Radeon HD 5470 (switchable) or that they would complete the update for this model? thanx

    Hello:

    More probably, no new W7 driver is available for your model.

    Maybe the drivers Windows 8 will be released when Windows 8 will be officially on sale.

    We do not know what HP models will be supported with the W8 drivers yet.

    Paul

  • How long to get a response for the exchange of license platform?

    I presented a case to Exchange my driver's license for CS6 from PC to Mac, and it's still sitting in the queue as "open - pending Adobe response". I bought the software online directly from Adobe and provided my order number. I don't understand what is so hard to get a response from customer service. Does anyone have a number I can call? Apparently, it is not found on their support site.

    Thank you!

    Phone support | Orders, returns, exchanges

    http://helpx.Adobe.com/x-productkb/global/phone-support-orders.html

    To the link below, click on the still need help? the option in the blue box below and choose the option to chat...

    Get help from cat with orders, refunds and exchanges (non - CC)
    http://helpx.Adobe.com/x-productkb/global/service-b.html ( http://adobe.ly/1d3k3a5 )

  • How long blackBerry Smartphones to rom for BlackBerry 9900?

    Can you help me? I have test rom 9900 Rogers. One day I got up three times!

    Huh?

  • Note the time that the button is pressed

    Hi all! I am a beginner in Labview and I encountered a problem. I want to know how long the button is pressed, but I have no idea how to go about do. I know how to find the total of the delivery of the program by using the flat sequence and time of the last image to subtract away the time of the initial image. But I have no idea how to do to add to the audit whether the button is pressed and gain time. My main goal is to find the time the button is pressed (from push button until the exit button) and the total program, run time.

    Please help me! Thanks to all in advance!

    Hi 8212349829,

    You can store values in a shiftregister of an iteration to iteration.

    You should not use this big a timeout. Do not forget that the timeout again with all the other events of 0.

    Time is at a time when the event occurs (it should be the internal counter that starts with the start-up of the pc). Type contains information about the type of event, click with the right button on the output and select create constant, control or indicator to see the possible values.

    Mike

  • Using the free trial can host you your mobile site via Business Çatal...? If Yes, for how long?

    I'm in the middle of my thesis in my final year of University. My thesis is to create a prototype of a mobile application (including the experience of the user). I wanted to create this on Adobe Muse with the free as trial version it seems perfect for my needs and I wouldn't need after 30 days anyway. But I'm curious to know how long it will be welcomed for or it will hold at all if im using a trial? Would I be able to download the project to show my tutor? I really want to use Muse but do not understand how I would be able to prove to my tutor that I did! Any professional help please?

    Hello

    You can host your mobile site via Muse to Business Catalyst. Your site will be online for the next 30 days.

    Also, you can extend the time limit upward to 2 years via the Partner Portal:

    http://Ava-next.worldsecuresystems.com/PartnerPortal/customers.aspx

    It will be useful,

    Sonam

  • How long is the first free trial version?

    How long is the free trial for first?

    all adobe tests are (supposed) 30 days.

  • How long are from multiple app archived to folio?

    I was wondering if anyone might know this.

    I created an application multi-folio containing monthly deliveries. My question is how long these questions are archived for? Year, 5 years, forever. My application will have questions that I published and are users provide access to these questions, even very old?

    Any response would be greatly appreciated.

    Michelle

    They remain available as long as you always keep such list as published in your DPS account.

    Neil

Maybe you are looking for

  • Since the upgrade to the latest FireFox 3.6.12, it seems to crash a lot while surfing.

    I've just updated today, and it seems that every website I visit causes FireFox hang. Windows Vista reports that FireFox unresponsive. I have no ID Crash info. Nice update!

  • Satellite L30 - 11 d: Vista watch 1.6 GHZ instead of 1.8 Ghz CPU

    I have a Satellite L30 - 11 d running Vista Basic and appears since the latest BIOS up to this day I get a lot of crashes on blue screen. I looked in windows journal and it is said that the BIOS is not correct for my machine.I know that I have an INT

  • Analysis of multiple files

    I am trying to parse data that extends between several files on several groups of PDM and channels. The files are contiguous blocks of the same sampled signals (i.e. they are split only to allow the viewing and effective storage). I need to analyze e

  • Is it possible to upgrade Windows XP Home to XP Professional more?

    I have Windows XP Home edition on my netbook, but I need the professional version for the school. I know that XP is to his last breath, but is it still possible to pay a fee to upgrade to get the professional version more? Thank you!

  • WLAN card error

    I get a box to appear in the left corner of the bottom of the screen that indicates the following: "Controller Dell Wireless WLAN Card stopped working and was closed. A problem caused the application to stop working correctly. » Since I can go on the