发布网友 发布时间:2023-04-24 10:46
共3个回答
热心网友 时间:2023-10-11 23:35
舞台上有个按钮A实例名为btn_A,按钮B实例名为btn_B,播放的影片剪辑实例名为MCimport flash.events.MouseEvent;var isbtn:Boolean = true; btn_A.buttonMode = true;btn_B.buttonMode = true;btn_B.visible = false;btn_A.addEventListener(MouseEvent.CLICK,onhander_clickA);function onhander_clickA(evt:MouseEvent):void{ if(isbtn) { isbtn = false; btn_A.visible = false; btn_B.visible = true; btn_B.addEventListener(MouseEvent.CLICK,onhander_clickB); } else { MC.gotoAndPlay(1); }}function onhander_clickB(evt:MouseEvent):void{ btn_A.visible = true;}热心网友 时间:2023-10-11 23:36
按钮A.onPress = function()追答按钮A.onPress = function()
{
按钮A._visible = false;
按钮B._visible = true;
}
按钮B.onPress = function()
{
按钮A._visible = true;
按钮B._visible = false;
}
热心网友 时间:2023-10-11 23:36
A按钮加监听事件 事件中写A.visible=false B.visible=true