初始 gotoAndStop() 后无法转移到另一帧;

Can't transfer to another frame after initial gotoAndStop();

您好,我正在尝试制作一个带有菜单的 Flash 网站。但问题是 gotoAndStop();转移到另一个框架后无法工作,因此无法 select 该子菜单中的项目。这就是我要说的。

假设我选择了 Flash 作品,它进入了那个帧,之后我无法 select 第二张图片中的任何项目,即使我已经有一个事件监听器。

第一张图片:

第二张图片:我无法点击这部分的任何内容。这是当我单击 flash works 时出现的内容。

这是我的代码。

//this is the flash works button
flashworks_btn.addEventListener(MouseEvent.CLICK, goflashworks);
function goflashworks(event:MouseEvent):void{
    gotoAndStop(2);
}

//let's say i picked basic animation
basicanimation_btn.addEventListener(MouseEvent.CLICK, gobasicanimation);
function gobasicanimation(event:MouseEvent):void{
    gotoAndStop(10);
}

编辑

import flash.events.MouseEvent;

stop();
//homepage
home_btn.addEventListener(MouseEvent.CLICK, gohome);
flashworks_btn.addEventListener(MouseEvent.CLICK, goflashworks);
aboutdev_btn.addEventListener(MouseEvent.CLICK, goaboutdev);

//flashworks
basicanimation_btn.addEventListener(MouseEvent.CLICK, gobasicanimation);
layersandsymbols_btn.addEventListener(MouseEvent.CLICK, golayersandsymbols);
interactive_btn.addEventListener(MouseEvent.CLICK, gointeractivebutton);

//about developer
profile1_btn.addEventListener(MouseEvent.CLICK, goprofile1);
profile2_btn.addEventListener(MouseEvent.CLICK, goprofile2);

//basic animation
shapetween_btn.addEventListener(MouseEvent.CLICK, goshapetween);
motiontween_btn.addEventListener(MouseEvent.CLICK, gomotiontween);
classictween_btn.addEventListener(MouseEvent.CLICK, goclassictween);
back_flashworks_btn.addEventListener(MouseEvent.CLICK, goback_flashworks);

//layers and symbols
guidelayer_btn.addEventListener(MouseEvent.CLICK, goguidelayer);
masklayer_btn.addEventListener(MouseEvent.CLICK, gomasklayer);

//amazing effect button
amazingbuttoneffect_btn.addEventListener(MouseEvent.CLICK, gobuttoneffect);

//function home page
function gohome(event:MouseEvent):void{
    gotoAndStop(1);
}
function goflashworks(event:MouseEvent):void{
    gotoAndStop(2);
}
function goaboutdev(event:MouseEvent):void{
    gotoAndStop(3);
}

//function flashworks
function gobasicanimation(event:MouseEvent):void{
    gotoAndStop(10);
}
function golayersandsymbols(event:MouseEvent):void{
    gotoAndStop(11);
}
function gointeractivebutton(event:MouseEvent):void{
    gotoAndStop(12);
}

//function about developer
function goprofile1(event:MouseEvent):void{
    gotoAndStop(13);
}
function goprofile2(event:MouseEvent):void{
    gotoAndStop(14);
}

//basic animation function
function goshapetween(event:MouseEvent):void{
    gotoAndStop(20);
}
function gomotiontween(event:MouseEvent):void{
    gotoAndStop(21);
}
function goclassictween(event:MouseEvent):void{
    gotoAndStop(22);
}
function goback_flashworks(event:MouseEvent):void{
    gotoAndStop(2);
}

//layers and symbols function
function goguidelayer(event:MouseEvent):void{
    gotoAndStop(23);
}
function gomasklayer(event:MouseEvent):void{
    gotoAndStop(24);
}

//interactive button function
function gobuttoneffect(event:MouseEvent):void{
    gotoAndStop(25);
}

谢谢,我设法解决了问题。事实证明,我需要在我的项目中将按钮的动作脚本分离在不同的框架中,因为我在解决它之前做的第一件事是我把所有的按钮实例只放在动作脚本层的一个框架中。