我创建了这个事件类:
package com.site {
import flash.events.Event;
public class clientEvent extends Event {
public static const connectionSucceeded: String = "connectionSucceeded";
public var prams: Object;
public function clientEvent(type: String, prams: Object) {
super(type);
this.prams = prams;
}
override public function clone(): Event {
return new clientEvent(type, prams);
}
}
}
在其他类(非主类)上,我写道:
dispatchEvent(new clientEvent(clientEvent.connectionSucceeded, new Object()));
我导入该类并返回此错误:1180:调用可能未定义的方法 dispatchEvent。