stop_btn.addEventListener(MouseEvent.CLICK,playMc);
play_btn.addEventListener(MouseEvent.CLICK,playMc);
function playMc(e:MouseEvent):void{
if(e.target==stop_btn){
_mc.stop();
}else{
_mc.play();
}
}
_mc就是你的影片剪辑名称
这个版本需要使用AS3.0写代码,而且要在帧上写才行。
stop();
stop_btn.addEventListener(MouseEvent.CLICK,Press);
function Press(evt:MouseEvent):void {
stop();
}
play_btn.addEventListener(MouseEvent.CLICK,Press);
function Press(evt:MouseEvent):void {
play();
}