3 Replies Latest reply on Feb 20, 2008 12:18 PM by 2JZ

    Checkbox's change event in ActionScript?!

    2JZ
      Hi,

      I am creating a custom canvas. The canvas gets an array of labels and I populate a list of check boxes with the supplied labels. In the canvas, I have a static "Select All" check box. Selecting the box will select all populated check boxes. De-selecting the "Select All" will un-check all boxes.

      Since I populate the check box as follow:
      public function InitApp():void
      {
      var NewCtrl:CheckBox;
      var str:String;

      for( var i:int=0; i<LabelArr.length; i++ )
      {
      NewCtrl = new CheckBox();
      NewCtrl.label = LabelArr .toString();
      NewCtrl.selected = true;
      VBoxCtrl.addChild( DisplayObject(NewCtrl) );
      }
      }

      Here is the question. If the user wants to de-select a check box, I want to de-select the "Select All" button. How can I do that? Since the "change" event is not available in actionscript, I don't know to do. :(

      Please help.