Bind event listener with flash DateChooser component
I'm new to flash, and using Macromedia flash 8.
I'd like to use in-built DateChooser component in my flash project.
So H开发者_高级运维ow do I bind an even handler on selection of any date? let's say I want to display selected date in another dynamic text element.
Okay, I got it:
var dcListener:Object = new Object();
dcListener.change = function(evt_obj:Object) {
var thisDate:Date = evt_obj.target.selectedDate;
trace("date selected: " +thisDate);
};
objDateChooser.addEventListener("change", dcListener);
精彩评论