yoolek as3 flash cms

AS3 SNIPPETS

Snippets-short code examples without source

Movie Clip

  1. remove child
  2. //prepare movie clip in library
    //put libraryButtonClass in class field in properties of movie clip
    var myButton:libraryButtonClass = new libraryButtonClass();
    myButton.name="myButtonName";
    addChild(myButton);
     
    myButton.addEventListener(MouseEvent.CLICK, removeButtonFunction);
    function removeButtonFunction(e:MouseEvent):void {
    	removeChild(MovieClip(e.currentTarget));
    	//OR:
    	//removeChild( getChildByName("myButtonName") );
    	//OR:
    	//removeChild(myButton)
    	//OR:
    	//removeChildAt(getChildIndex(e.target as DisplayObject));
    }
  3. link title
  4. link title

dfsfs

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.