detecting extended button press with adobe flash

Posted on 2012-08-22
Medium Priority
Last Modified: 2012-08-22
How do I deferentiate between a single button click and an extended click.   I need to update a counter and want to give the user the ability to do either single increment updates or multi-increment on extended button press.
Question by:PeterTrefren
1 Comment

Accepted Solution

Gabriologist earned 1500 total points
ID: 38322774
It's always tough to know what level of detail to answer any question at, because we don't know how knowledgable / experienced the question asker is...

So, I'm going to give a short answer that expects that your are fairly knowledgeable with Flash / actionscript. If that's an incorrect assumption, then just ask for an easier / more detailed explanation.

I would solve this by having a 'click' on the button start a timer. Based on the value of that timer I could take other decisions - i.e. if the user had been pressing the button for more than, say, 1 second, then I have something else happen.

Releasing the button stops the timer.

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question