from the help section:
Quote:
|
Originally Posted by flash help panel
Example
This example, written on a frame of the timeline, sends a message to the Output panel when a DateChooser instance called my_dc is changed. The first line of code creates a listener object called form. The second line defines a function for the change event on the listener object. Inside the function is a trace() statement that uses the event object that is automatically passed to the function, in this example eventObj, to generate a message. The target property of an event object is the component that generated the event (in this example, my_dc).
// Create listener object.
var dcListener:Object = new Object();
dcListener.change = function(evt_obj:Object) {
var thisDate: Date = evt_obj.target.selectedDate;
trace("date selected: " + thisDate);
};
// Add listener object to date chooser.
my_dc.addEventListener("change", dcListener);
|
so instead of the trace statement... call a function or event to trigger instead.
__________________
tg
---
what the hell was i thinking?
Last edited by tg; 11-30-2006 at 09:39 PM.
|