On this tutorial as usual we start from scratch, we create a symbol, and from this movie clip a class is exported to ActionScript. We add and remove the item from stage using add and remove child ActionScript method..
HERE IS THE SOURCE CODE!
// Avraham Saltoun: solutions at say-web dot com
// FREE to USE, COPY and DISTRIBUTE
var mySmile : Smile = new Smile();
// the variable mySmile will contain
// a smile movie clip
addChild(mySmile);
//this will place a smile
//on our empty stage
remove_btn.addEventListener(MouseEvent.CLICK, removeSmile);
// removeSmile is a function we will create
// that removes the movie clip from stage
function removeSmile (event:MouseEvent):void {
removeChild(mySmile);
// this will remove the movie clip from stage
}
// thanks for watching !






One Response to “Smile: The Complete Add and Remove Child Method ActionScript 3.0 Video Tutorial”