Removing an Item from the Display List : Sprite : Development Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Development » Sprite »

 

Removing an Item from the Display List


 
package {
  import flash.display.Sprite;
  import flash.text.TextField;
  import flash.events.MouseEvent;

  public class RemoveChildExample extends Sprite {
    private var _label:TextField;
    
    public function RemoveChildExample(  ) {
      _label = new TextField(  );
      _label.text = "Some Text";
      
      addChild_label );
      
      stage.addEventListenerMouseEvent.CLICK, removeLabel );
    }
    
    public function removeLabelevent:MouseEvent ):void {
      removeChild_label );
    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Development
» Sprite