Skip to main content
December 12, 2015
Answered

Is it possible to disable radio button group?

  • December 12, 2015
  • 1 reply
  • 605 views

Hi.

I want to know is it possible to temporarily disable radio button group? Because Im planning to temporarily disable the radio button group in my project while the timer on pause. Anyone can help me?

This topic has been closed for replies.
Correct answer nezarov

No you have to use the buttons names, for example:

btn1.enabled = btn2.enabled = btn3.enabled = false;

1 reply

Inspiring
December 12, 2015

Use:

btnName.enabled = false; // to disable

And btnName.enabled = true; // to enable

December 12, 2015

I try to add inside the code but when I run the file, I click pause timer button, the next button still can direct to the next page

var pause:Boolean = false;

pausebtn.addEventListener(MouseEvent.CLICK, onClick);

function onClick(e:MouseEvent):void

{

    if(pause == false)

    {

        countdownTimer.stop();

        pause = true;

  a1.enabled = false; // <------------------------------------- HERE IS MY ADJUSTMENT to disable the radio button

  //mygroup1.mouseEnabled = false;

  //mygroup1.mouseChildren = false;

    }

    else

    {

        countdownTimer.start();

        pause = false;

nezarovCorrect answer
Inspiring
December 12, 2015

No you have to use the buttons names, for example:

btn1.enabled = btn2.enabled = btn3.enabled = false;