我迷路了。TypeError: Error #1009: Cannot access a property or method of a null object reference.
我的文档类第一次尝试访问舞台上的简单文本字段时收到一条输出消息(从 IDE 添加,而不是 actionscript)
package {
import flash.display.*;
import fl.text.*;
import flash.text.*;
import flash.events.*;
import flash.net.*;
public class Main extends MovieClip {
private var _netConnection:NetConnection;
private var _responder:Responder;
/* some other public + private vars */
public function Main() {
init();
}
public function init(e:*=null):void {
_netConnection = new NetConnection();
_responder = new Responder(uponResult);
txt.text = "init()";
}
/* more functions */
}
}
我尝试添加txt.addEventListener(Event.ENTER_FRAME, init);
以防 txt TLFTextField is not ... there... 一开始,但它仍然输出错误。
我觉得自己有点像白痴atm,预后文件是什么?JB