Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

About Skins

Explorer ,
Jan 16, 2013 Jan 16, 2013

This question was posted in response to the following article: http://help.adobe.com/en_US/as3/components/WS5b3ccc516d4fbf351e63e3d118a9c65b32-7f50.html

TOPICS
ActionScript
393
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 16, 2013 Jan 16, 2013

I have 12 Check box compontents that work Independently turning items on and off. I want to be able to turn all the check boxes on or off but I'm having a hard time figuring out the code. Please help e-mail answer to michael.t.spinella@nga.mil. -Mike

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jan 16, 2013 Jan 16, 2013
LATEST

Asssuming you use the AS3 standard checkbox components:

//Three Checkboxes with names cb1,cb2,cb3 on stage

cb1.label = "1";

cb2.label = "2";

cb3.label = "1+2+3";

//the default behaviour of the third Checkbox is enhanced to toggle 1 and 2 also

cb3.addEventListener(Event.CHANGE, toggleAll);

function toggleAll(e:Event):void{

    if(cb1.selected == true &&  cb2.selected == true){

        cb1.selected = cb2.selected = false;

    }

    else{

        cb1.selected = cb2.selected = true;

    }

}

Use this as a template for your 12 Checkbox problem.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines