无法在 Flash CS4 中导入 UIComponent?
因此,我将此行添加到第一帧脚本中的 .FLA 文件中:
import mx.core.UIComponent;
我收到此错误:
1093: Syntax error.
在 UIComponent.as 第 54 行中。在“编译器错误”面板中双击该错误,我看到:
#include "../core/ComponentVersion.as"
好的,语法错误可能在 ComponentVersion 中.as ...除了它真的,真的不应该。如果我将该文件加载到 Flash 编辑器中并进行语法检查,则它没有错误。但是,如果我将该文件的唯一非注释行 (static var version:String = "2.0.2.127"; ) 复制到 UIComponent 中代替 #include,它会起作用吗???
现在我收到此错误:
5007: An ActionScript file must have at least one externally visible definition.
请问?这是 Flash 提供的类定义文件!
如有任何线索,我们将不胜感激。
我正在使用 Flash CS4 (10.0.2)。
So I add this line to my .FLA file in the first frame's script:
import mx.core.UIComponent;
I receive this error:
1093: Syntax error.
in UIComponent.as line 54. Double click on that in the Compiler Errors panel and I see:
#include "../core/ComponentVersion.as"
OK, the syntax error is likely in ComponentVersion.as ... except it really, really shoud not be. And if I load that file into the Flash editor and syntax check it has no errors. However, if I copy the sole non-comment line of that file (static var version:String = "2.0.2.127"; ) into UIComponent in place of the #include, it works????
Now I get this error:
5007: An ActionScript file must have at least one externally visible definition.
Excuse me? This is a class definition file suppled with Flash!
Any clues would be gratefully received.
I'm using Flash CS4 (10.0.2).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
除非您有意尝试导入 Flex SDK,否则您应该使用 Flash Pro 中包含的库中的 UIComponent 类,fl.core.UIComponent,而不是 Flex 对应项 mx.core.UIComponent。
Unless you are intentionally trying to import the Flex SDK, you should be using the UIComponent class from the library included in Flash Pro, fl.core.UIComponent, and not the Flex counterpart, mx.core.UIComponent.