私はこのイベントクラスを作成しました:
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 を呼び出します。