Animation couldnt control with Play pause toggle button..
I have multiple movie clip with bg sound.I have used the code AS3 for toggling the animation ( Play & Pause ).Automatically the animation starts and button also togggled on click but couldnt control the animation .
I need some solutions like when the intial stage the animation wont start etither the button click to play.After that the flow as it is in action ( ON Click ). Kindly anyone guide me to solve it. i'm very new to flash. this is my first project and ihave to finish it soon..
btns.visible = false;
btns.addEventListener(MouseEvent.CLICK,onEl);
dfr.addEventListener(MouseEvent.MOUSE_OVER,onEls);
dfr.addEventListener(MouseEvent.MOUSE_OUT,onEld);
btns.addEventListener(MouseEvent.MOUSE_OVER,onEls);
btns.addEventListener(MouseEvent.MOUSE_OUT,onEld);
var _vrSts:int = 0;
function onEl(eve:Event):void {
if(_vrSts) {
trace('status:'+_vrSts);
_vrSts = 0;
btns.gotoAndPlay(1);
}else {
trace('status:'+_vrSts);
_vrSts = 1;
btns.gotoAndStop(2);
}
}
function onEls(eve:Event):void {
btns.visible = true;
}
function onEld(eve:Event):void {
btns.visible = false;
}
