0

I am getting a number of errors for each of my items, each on different keyframes.

I have "Automatically Declare Stage Instances" turned off so I thought that might be having something to do with it. It is quite annoying. The errors only show up when I test the MainMenu scene, testing the movie has the buttons not animating.

I have tried to fit all the info into some screen shots.

I would appreciate any help you could render. At this point I'm out of ideas.

Errors and Instance Properties Errors and Instance Properties

Symbol Properties of Menu and Script Class Symbol Properties of Menu and Script Class

4

1 回答 1

0

要么:您定位的按钮不正确..您的错误内容为:访问未定义的属性 button_main_quit //检查拼写“button_main_quit”此外,您应该使用调试模式,它会告诉您错误在哪里

另一个:在实例已经分配之后,按钮在不同的框架上声明。

一个例子:

假设您有两个时间线,顶部名为操作,第二个名为内容:在顶部操作时间线框架 1 中,您添加了一个事件 Enter-Frame 函数,例如:然后为按钮添加一个侦听器,称为“btn_1”。现在在内容层上,添加按钮,但在内容层的第 5 帧:

现在您将遇到错误,因为舞台上的按钮没有准备好分配给我们在第一帧的 enter-Frame 函数中添加的侦听器。希望你明白这一点。

于 2013-04-01T16:12:40.817 回答