flash AS3多个按钮跳转多帧怎么做
假设我在52帧有button1button2button33个按钮,按下b1按钮后跳到第53帧,按下b2按钮后跳到第54帧按下b3按钮后跳到第55帧,在535455帧分别...
假设我在52帧有button1 button2 button3 3个按钮,按下b1按钮后跳到第53帧,按下b2按钮后跳到第54帧 按下b3按钮后跳到第55帧,在53 54 55帧分别有一个按钮,要按下时可以跳回52帧,要怎么做,例如下面的问题
stop();
button1.addEventListener(MouseEvent.CLICK,a1ClickHandler);
function a1ClickHandler(event:MouseEvent)
{
gotoAndPlay(53);
}
button2.addEventListener(MouseEvent.CLICK,a2ClickHandler);
function a2ClickHandler(event:MouseEvent)
{
gotoAndPlay(1);
}
button3.addEventListener(MouseEvent.CLICK,a3ClickHandler);
function a3ClickHandler(event:MouseEvent)
{
gotoAndPlay(20);
}
例如 在第52帧上我这么写,在第53帧这么写
stop();
button4.addEventListener(MouseEvent.CLICK,a1ClickHandler);
function a1ClickHandler(event:MouseEvent){
gotoAndPlay(52);
}
就会显示函数定义重复 所以求大神指导帮我编写一下脚本我copy下 展开
stop();
button1.addEventListener(MouseEvent.CLICK,a1ClickHandler);
function a1ClickHandler(event:MouseEvent)
{
gotoAndPlay(53);
}
button2.addEventListener(MouseEvent.CLICK,a2ClickHandler);
function a2ClickHandler(event:MouseEvent)
{
gotoAndPlay(1);
}
button3.addEventListener(MouseEvent.CLICK,a3ClickHandler);
function a3ClickHandler(event:MouseEvent)
{
gotoAndPlay(20);
}
例如 在第52帧上我这么写,在第53帧这么写
stop();
button4.addEventListener(MouseEvent.CLICK,a1ClickHandler);
function a1ClickHandler(event:MouseEvent){
gotoAndPlay(52);
}
就会显示函数定义重复 所以求大神指导帮我编写一下脚本我copy下 展开
1个回答
展开全部
那你把53帧的 a1 改成 a4 呗~
追问
跳回的脚本
stop();
button5.addEventListener(MouseEvent.CLICK,a1ClickHandler);
function a4ClickHandler(event:MouseEvent)
{
gotoAndStop(52);
}
怎么跳不了
追答
第二行 button5.addEventListener(MouseEvent.CLICK,a1ClickHandler); 其中的 a1 也要改成a4啊 = =
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询