日期:2013-12-03  浏览次数:20586 次

在场景之间跳转,动作应该写在 _root ,在 MC 内的按钮动作如果要跳到另外的场景,直接按下面写不会无效果:
on(release){
_root.gotoAndPlay("场景 2", 1);
}

以下是一种处理方法:

在场景 1 的第一帧写个函数:
function gotoScene2(){
gotoAndPlay("场景 2", 1);
}

在 MC 里的按钮上写:
on(release){
_root.gotoScene2();
}

如果有多个按钮,以此类推。

******************
2006-9-15 更新:
以下方法由 小笨马 提供,强烈推荐。

在其他场景的帧上命名,比如“testScene2”,然后在 MC 里的按钮上写:
on(release){
_root.gotoAndPlay("testScene2");
}

留意,不要写场景名。