错误代码:5007 [英] error code : 5007
问题描述
我跟着这个 http://active.tutsplus当测试时,我得到了
5007:An / com / tutorials / actionscript / as3-101-oop-introduction-basix / ActionScript文件必须有
至少有一个外部可见的
定义
鉴于我有一个公共类 p>
package {
import flash.display.MovieClip;
import flash.text.TextField;
public class DocumentClass extends MovieClip {
public function DocumentClass(){
var tf:TextField = new TextField();
addChild(tf);
tf.text =Hello World;
$ div class =h2_lin>解决方案
除此之外,hmm。有可能你有另一个DocumentClass.as在你的.fla的同一个源路径的某个地方,而这个是不正确的形成的?您是否在本教程的实验过程中创建了多个文件?
I followed this tut http://active.tutsplus.com/tutorials/actionscript/as3-101-oop-introduction-basix/ when testing I got
5007: An ActionScript file must have at least one externally visible definition
WHEREAS I DO HAVE A PUBLIC CLASS
package {
import flash.display.MovieClip;
import flash.text.TextField;
public class DocumentClass extends MovieClip {
public function DocumentClass() {
var tf:TextField = new TextField();
addChild(tf);
tf.text = "Hello World";
}
}
}
Are you saving it as DocumentClass.as? The Class name, Constructor and AS file all need to have exactly the same name.
Other than that, hmm. It's possible that you have another DocumentClass.as somewhere within the same source path of your .fla, and this one is formed incorrectly? Have you created multiple files in the course of your experimentation with this tutorial?
这篇关于错误代码:5007的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!