【发布时间】:2016-04-29 01:21:03
【问题描述】:
我目前正在制作一个只传递一条数据的基本自定义事件类。
package {
import flash.events.Event;
public class DateEvent extends Event {
public static const DATE_SET: String = "exampleEvent";
public var calendarObj: Object;
public function DateEvent(type: String, calendarObj: Object = null) {
this.calendarObj = calendarObj;
super(type, false, false);
}
override public function clone(): Event {
return new DateEvent(type, calendarObj);
}
}}
当这样调用事件时:
selectedDate = new Date(displayedYear, displayedMonthNum, displayedDate, displayedHour, displayedMins);
trace(selectedDate);
dispatchEvent(DateEvent(DateEvent.DATE_SET, selectedDate));
我收到“参数数量不正确”错误。我很困惑,因为我没有超过我应该通过的(我认为)。
【问题讨论】:
标签: actionscript-3 events actionscript