我的 Flash 项目中的“环顾四周”按钮仅在您每隔一次单击时才起作用。我所有的其他按钮都有相同的代码并且工作正常。这是我的 ActionScript 代码:
import flash.events.Event;
escape_btn.addEventListener(MouseEvent.CLICK, pressedEscape)
function pressedEscape(event:MouseEvent):void
{
animations.gotoAndPlay("escape");
}
bio_btn.addEventListener(MouseEvent.CLICK, pressedBio);
function pressedBio(event:MouseEvent):void
{
gotoAndStop("biography");
}
home_btn.addEventListener(MouseEvent.CLICK, pressedHome);
function pressedHome(event:MouseEvent):void
{
gotoAndStop("home");
}
analysis_btn.addEventListener(MouseEvent.CLICK, pressedAnalysis);
function pressedAnalysis(event:MouseEvent):void
{
gotoAndStop("analysis");
}
lookaround_btn.addEventListener(MouseEvent.CLICK, pressedLookAround)
function pressedLookAround(event:MouseEvent):void
{
animations.gotoAndPlay("look around");
}
stop();
这是我的动画时间线的一些屏幕截图: