an_btn.label = "增大";
//按钮组件有一个属性是label,意思是标签,首先我们让它显示为“增大”
an_btn.addEventListener(MouseEvent.CLICK,dj);
//事件侦听
function dj(event:MouseEvent):void
//定义函数
{
switch (an_btn.label)
{
case "增大" :
hua_mc.play();
an_btn.label = "暂停";
break;
case "暂停" :
hua_mc.stop();
an_btn.label = "旋转";
break;
case "旋转" :
hua_mc.rotation += 90;
an_btn.label = "停止";
break;
case "停止" :
hua_mc.gotoAndStop(1);
an_btn.label = "增大";
break;
}
}