User Guide

Customizing the DateChooser component (Flash Professional only) 413
This code assigns a value to the selectableRange property in an ActionScript object that
contains two Date objects with the variable names
rangeStart and rangeEnd. This
defines an upper and lower end of a range in which the user can select a date.
4. In the Actions panel, enter the following code on Frame 1 of the timeline to set a range of
holiday disabled dates:
flightCalendar.disabledRanges = [{rangeStart: new Date(2003, 11, 15),
rangeEnd: new Date(2003, 11, 26)}];
5.
In the Actions panel, enter the following code on Frame 1 of the timeline to
disable Mondays:
flightCalendar.disabledDays=[1];
6.
Select Control > Test Movie.
To create a DateChooser component instance using ActionScript:
1. Drag the DateChooser component from the Components panel to the current
document’s library.
2. Select the first frame in the main Timeline, open the Actions panel, and enter the
following code:
this.createClassObject(mx.controls.DateChooser, "my_dc", 1);
This script uses the method “UIObject.createClassObject()” on page 1362 to create the
DateChooser instance, and then sizes and positions the grid.
3. Select Control > Test Movie.
Customizing the DateChooser
component (Flash Professional only)
You can transform a DateChooser component horizontally and vertically while authoring and
at runtime. While authoring, select the component on the Stage and use the Free Transform
tool or any of the Modify > Transform commands. At runtime, use the
setSize() method
(see
UIObject.setSize()).
Using styles with the DateChooser component
You can set style properties to change the appearance of a DateChooser instance. If the name
of a style property ends in “Color”, it is a color style property and behaves differently than
noncolor style properties. For more information, see “Using styles to customize component
color and text” in Using Components.