1 Replies - 1163 Views - Last Post: 19 April 2010 - 04:41 AM

#1 reyco1  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 2
  • View blog
  • Posts: 43
  • Joined: 20-March 05

UI component - Check box

Posted 27 March 2005 - 04:44 AM

Description: Place a checkbox component on the stage and give it an instance name of myCheckbox. Drag a textArea component onto the stage and giev it an instance name of myLabel. paste the code onto frame one of the movie.actions for the check box component in mx 2k4
// create event listener object for checkbox
myCheckboxListener = new Object();
// click event handler
myCheckboxListener.click = function() {
     if (myCheckbox.selected) {
          myLabel.text = "You have checked the checkbox!";
     } else {
          myLabel.text = "You have unchecked the checkbox!";
     }
};
// register the event listener
myCheckbox.addEventListener("click", myCheckboxListener);
// clear the label
myLabel.text = "";


Is This A Good Question/Topic? 0
  • +

Replies To: UI component - Check box

#2 aha16  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 0
  • Joined: 19-April 10

Re: UI component - Check box

Posted 19 April 2010 - 04:41 AM

vv
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1