detecting extended button press with adobe flash

Posted on 2012-08-22
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
    LVL 4

    Accepted Solution

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
    Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
    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.

    758 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now