2 Replies Latest reply on Jan 1, 2012 2:04 AM by Abhishek Chaudhary

    Setting State

    HenriqueCanova

      Hi

       

      I need to create some button in execution times, I used the code bellow to make it,

       

      but I need to create this button in only one state, and in this code the button was created

       

      in all states, someone know how I can set the state of the new button.

       

      Thanks

       

       

      var n_button:Button = new Button;
      n_button.id = "test";
      n_button.addEventListener(MouseEvent.CLICK,test);
      addElement(n_button);