首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >类上出现As3错误5000?

类上出现As3错误5000?
EN

Stack Overflow用户
提问于 2013-10-12 08:19:20
回答 1查看 844关注 0票数 0

所以我试着用我的.fla (通过QuickKong)设置一个as3.file的类

发生此错误:

代码语言:javascript
复制
Scene 1, Layer 'Actions', Frame 4, Line 4   1046: Type was not found or was not a compile-time constant: MouseEvent.
Scene 1, Layer 'Actions', Frame 4, Line 11  1046: Type was not found or was not a compile-time constant: MouseEvent.
Scene 1, Layer 'Actions', Frame 4, Line 18  1046: Type was not found or was not a compile-time constant: MouseEvent.
Scene 1, Layer 'Actions', Frame 4, Line 25  1046: Type was not found or was not a compile-time constant: MouseEvent.
Scene 1, Layer 'Actions', Frame 4, Line 32  1046: Type was not found or was not a compile-time constant: MouseEvent.
Scene 1, Layer 'Actions', Frame 4, Line 39  1046: Type was not found or was not a compile-time constant: MouseEvent.
Scene 1, Layer 'Actions', Frame 4, Line 46  1046: Type was not found or was not a compile-time constant: MouseEvent.
Scene 1, Layer 'Actions', Frame 4, Line 53  1046: Type was not found or was not a compile-time constant: MouseEvent.
Scene 1, Layer 'Actions', Frame 4, Line 59  1046: Type was not found or was not a compile-time constant: MouseEvent.
Scene 1, Layer 'Actions', Frame 4, Line 67  1046: Type was not found or was not a compile-time constant: MouseEvent.
Scene 1, Layer 'Actions', Frame 4, Line 74  1046: Type was not found or was not a compile-time constant: MouseEvent.
Scene 1, Layer 'Actions', Frame 4, Line 81  1046: Type was not found or was not a compile-time constant: MouseEvent.
Scene 1, Layer 'Actions', Frame 4, Line 88  1046: Type was not found or was not a compile-time constant: MouseEvent.
Scene 1, Layer 'Actions', Frame 4, Line 95  1046: Type was not found or was not a compile-time constant: MouseEvent.
Scene 1, Layer 'Actions', Frame 4, Line 102 1046: Type was not found or was not a compile-time constant: MouseEvent.
Scene 1, Layer 'Actions', Frame 4, Line 108 1046: Type was not found or was not a compile-time constant: MouseEvent.
**C:\Users\Lenovo\Desktop\To A Million\QuickKong.as, Line 1 5000: The class 'QuickKong' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type.**

然后我导入:import flash.events.MouseEvent;

错误变成了这样。

代码语言:javascript
复制
Scene 1, Layer 'Actions', Frame 4, Line 8   1180: Call to a possibly undefined method play.
Scene 1, Layer 'Actions', Frame 4, Line 15  1180: Call to a possibly undefined method play.
Scene 1, Layer 'Actions', Frame 4, Line 22  1180: Call to a possibly undefined method play.
Scene 1, Layer 'Actions', Frame 4, Line 29  1180: Call to a possibly undefined method play.
Scene 1, Layer 'Actions', Frame 4, Line 36  1180: Call to a possibly undefined method play.
Scene 1, Layer 'Actions', Frame 4, Line 43  1180: Call to a possibly undefined method play.
Scene 1, Layer 'Actions', Frame 4, Line 50  1180: Call to a possibly undefined method play.
Scene 1, Layer 'Actions', Frame 4, Line 57  1180: Call to a possibly undefined method play.
Scene 1, Layer 'Actions', Frame 4, Line 63  1180: Call to a possibly undefined method play.
Scene 1, Layer 'Actions', Frame 4, Line 71  1180: Call to a possibly undefined method play.
Scene 1, Layer 'Actions', Frame 4, Line 78  1180: Call to a possibly undefined method play.
Scene 1, Layer 'Actions', Frame 4, Line 85  1180: Call to a possibly undefined method play.
Scene 1, Layer 'Actions', Frame 4, Line 92  1180: Call to a possibly undefined method play.
Scene 1, Layer 'Actions', Frame 4, Line 99  1180: Call to a possibly undefined method play.
Scene 1, Layer 'Actions', Frame 4, Line 106 1180: Call to a possibly undefined method play.
Scene 1, Layer 'Actions', Frame 4, Line 112 1180: Call to a possibly undefined method play.
C:\Users\Lenovo\Desktop\To A Million\QuickKong.as, Line 1   1180: Call to a possibly undefined method addFrameScript.
Scene 1, Layer 'menu', Frame 2, Line 1  1180: Call to a possibly undefined method stop.
Scene 1, Layer 'Layer 4', Frame 4, Line 1   1180: Call to a possibly undefined method stop.
Scene 1, Layer 'Layer 4', Frame 27, Line 1  1180: Call to a possibly undefined method stop.
Scene 1, Layer 'Layer 4', Frame 27, Line 2  1180: Call to a possibly undefined method gotoAndPlay.
Scene 1, Layer 'Layer 4', Frame 28, Line 1  1180: Call to a possibly undefined method stop.
Scene 1, Layer 'Layer 4', Frame 29, Line 1  1180: Call to a possibly undefined method stop.
Scene 1, Layer 'Layer 4', Frame 30, Line 1  1180: Call to a possibly undefined method stop.
Scene 1, Layer 'Layer 4', Frame 31, Line 1  1180: Call to a possibly undefined method stop.
Scene 1, Layer 'Layer 4', Frame 32, Line 1  1180: Call to a possibly undefined method stop.
Scene 1, Layer 'Layer 4', Frame 33, Line 1  1180: Call to a possibly undefined method stop.
Scene 1, Layer 'Layer 4', Frame 34, Line 1  1180: Call to a possibly undefined method stop.
Scene 1, Layer 'Layer 4', Frame 35, Line 1  1180: Call to a possibly undefined method stop.
Scene 1, Layer 'Layer 4', Frame 36, Line 1  1180: Call to a possibly undefined method stop.
Scene 1, Layer 'Layer 4', Frame 37, Line 1  1180: Call to a possibly undefined method stop.
Scene 1, Layer 'Layer 4', Frame 38, Line 1  1180: Call to a possibly undefined method stop.
Scene 1, Layer 'Layer 4', Frame 39, Line 1  1180: Call to a possibly undefined method stop.
Scene 1, Layer 'Layer 4', Frame 40, Line 1  1180: Call to a possibly undefined method stop.
Scene 1, Layer 'Layer 4', Frame 41, Line 1  1180: Call to a possibly undefined method stop.
Scene 1, Layer 'Layer 4', Frame 42, Line 1  1180: Call to a possibly undefined method stop.
Scene 1, Layer 'Layer 4', Frame 43, Line 1  1180: Call to a possibly undefined method stop.
Scene 1, Layer 'Layer 4', Frame 44, Line 1  1180: Call to a possibly undefined method stop.
**C:\Users\Lenovo\Desktop\To A Million\QuickKong.as, Line 1 5000: The class 'QuickKong' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type.**

如何解释和修复此错误?我有文件的路径。.fla已识别fla中的文件。

The AS File

EN

回答 1

Stack Overflow用户

发布于 2013-10-12 08:29:09

将以下代码添加到您的代码中:

代码语言:javascript
复制
import flash.display.MovieClip;

并将公共类更改为:

代码语言:javascript
复制
public class QuickKong extends MovieClip
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/19329091

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档