简体   繁体   English

在AS3中将符号添加到阶段出现1046错误

[英]1046 error for symbol added to stage in AS3

The error I keep getting is this x4: 我一直得到的错误是这个x4:

Symbol 'list'  ---  1046: Type was not found or was not a compile-time constant

I have four movie clips within my movie clip named 'list', which are called print1, etc. I get an error for each one. 我的影片剪辑中有四个名为“ list”的影片剪辑,它们称为print1,等等。每一个我都会出错。 All I'm trying to do is add the 'list' movieclip to the stage with addChild(list), which worked before I added those four 'print' movieclips. 我要做的就是使用addChild(list)将“ list”动画片段添加到舞台上,在我添加这四个“ print”动画片段之前,该方法就起作用了。

The 'print' movieclips are nested within a folder and subfolder in my library. “打印”电影剪辑嵌套在我库中的文件夹和子文件夹中。 My 'list' symbol is in the main directory. 我的“列表”符号在主目录中。 Would that have any influence on the error? 这对错误有影响吗? Or do I have to declare anything else besides the 'list' movieclip in the actionscript? 还是我必须在动作脚本中声明“列表”动画片段以外的其他内容?

您需要选中“自动声明阶段实例”,或者需要在类定义中提供变量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM