I have buttons on the stage (run1_btn - run5-btn) that when clicked adds a movie clip to the stage.(hand) The movie clip contains a few frames of animation. When a button is clicked the movieclip gets added but the animation is already finished. I thought that when the mc got added to the stage then the animation would start, but this does not seem to be the case. Does anyone know a way around this.
Here is my code:
var handSlap:hand;
handSlap = new hand();
//event listeners
newPig.run1_btn.addEventListener(MouseEvent.CLICK, clickArea);
newPig.run2_btn.addEventListener(MouseEvent.CLICK, clickArea);
newPig.run3_btn.addEventListener(MouseEvent.CLICK, clickArea);
newPig.run4_btn.addEventListener(MouseEvent.CLICK, clickArea);
newPig.run5_btn.addEventListener(MouseEvent.CLICK, clickArea);
//functions
function clickArea(evtObj:MouseEvent):void
{
trace(evtObj.target.name);
addChild(handSlap);
handSlap.x =200;
handSlap.y=200;
}