【问题标题】:Animate Actionscript 3.0 scene not found, but scene exists未找到 Animate Actionscript 3.0 场景,但存在场景
【发布时间】:2020-04-01 12:41:04
【问题描述】:

我的项目是一本交互式电子书,我为每一页创建了不同的场景(有 1 到 19 个场景) 我需要插入一些 ActionScript 才能返回主页,然后转到其他一些页面,但是当我单击场景中的按钮时,此错误不断出现:

ArgumentError:错误 #2108:找不到场景场景 1。
在 flash.display::MovieClip/gotoAndPlay()
在 OPP_TCC_fla::MainTimeline/fl_ClickToGoToScene_50()

我写的代码是:

 b_home.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene_50);

function fl_ClickToGoToScene_50(event:MouseEvent):void
{
    MovieClip(this.root).gotoAndPlay(1, "Scene 1");
}

我不知道如何解决这个问题!任何帮助表示赞赏,谢谢!

【问题讨论】:

  • 可能 ...gotoAndPlay(1, "Cena 19"); ?

标签: actionscript-3 flash jquery-animate adobe adobe-animate


【解决方案1】:

不,这也并不总是有效...

ArgumentError:错误 #2108:找不到场景 ElDiabloChase。
在 flash.display::MovieClip/gotoAndPlay()
在 Final_Project_v13b_QuitCode__700X438__EndCredits_fla::MainTimeline/ClickToGoToScene1()[Final_Project

我确实已经屈服于从场景列表中复制名称并将其粘贴到代码中的荒谬任务。

如果您在浏览器中测试电影,它大部分时间都可以正常工作,但在 Animate 中,我几乎永远无法正常工作。

我所能想到的就是这是一个奇怪的“# of character thing”或类似的东西。我被难住了。

Scene List

【讨论】:

    【解决方案2】:

    就像@Organis 在评论中所说,您必须在第二个参数中指定场景。

    MovieClip(this.root).gotoAndPlay(1, "Cena 19"); 将带你到Cena 19 的第一帧。

    MovieClip(this.root).gotoAndPlay(1, "Scene 1"); 会带你到Scene 1 的第一帧。

    查看此问题的答案:Action Script - how to go to another scene from movieClip?

    【讨论】:

      猜你喜欢
      • 2018-09-07
      • 2014-10-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-04-05
      • 2020-07-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多