How do i disable a button, then re-enable it?

Posted on 2007-08-05
Last Modified: 2013-11-05
In my flash project, I have a button that triggers a movie clip to transition from non-visible to visible. On this "pop-up" I have a button that makes it disappear again. However, the pop-up is sizable, taking up most of the page, but the user is still able to click on the buttons behind it. What I want is the button that triggers the pop-up to disable all of the other buttons, so the user cannot interact with them, and the button that hides the pop-up to re-enable them. Right now I have some buttons embedded in movie clips, while others are directly in the timeline. What actionscript can I use to achieve this desired effect?
Question by:DesignersCafe
    1 Comment
    LVL 34

    Accepted Solution

    use Button.enabled property to enable and disable the button

    sample code:

    Button_instance_name.enabled = false; // this code will disable the button

    Button_instance_name.enabled = rue; // this code will enable the button

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
    Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
    In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
    The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…

    729 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

    18 Experts available now in Live!

    Get 1:1 Help Now