Example
This example, written on a frame of the Timeline, sends a message to the Output panel when a
date field called
second line defines a function for the
statement that uses the event object that is automatically passed to the function, in this
trace()
example
eventObj
component that generated the event—in this example,
property is accessed from the event object's
EventDispatcher.addEventListener()
listener object as parameters.
form
function change(eventObj){
trace("date selected " +
}
myDF.addEventListener("change", this);
DateField.close()
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
myDF.close()
Parameters
None.
Returns
Nothing.
Description
Method; closes the pop-up menu.
Example
The following code closes the date chooser pop-up of the
myDF.close();
DateField.close
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
376
Chapter 6: Components Dictionary
is changed. The first line of code creates a listener object called
myDF
change
, to generate a message. The
eventObj.target.selectedDate) ;
event on the listener object. Inside the function is a
property of an event object is the
target
. The
myDF
property. The last line calls
target
from
and passes it the
myDF
date field instance:
myDF
form
DateField.selectedDate
event and the
change
. The
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?
Questions and answers