To create an application with the DateChooser component:
Double-click the DateChooser component in the Components panel to add it to the Stage.
1.
In the Property inspector, enter the instance name flightCalendar.
2.
In the Actions panel, enter the following code on Frame 1 of the Timeline to set the range of
3.
selectable dates:
flightCalendar.selectableRange = {rangeStart:new Date(2003, 9, 15),
rangeEnd:new Date(2003, 11, 31)}
This code assigns a value to the
contains two Date objects with the variable names
upper and lower end of a range in which the user can select a date.
In the Actions panel, enter the following code on Frame 1 of the Timeline to set a range of
4.
holiday disabled dates:
flightCalendar.disabledRanges = [{rangeStart: new Date(2003, 11, 15),
rangeEnd: new Date(2003, 11, 26)}];
In the Actions panel, enter the following code on Frame 1 of the Timeline to disable Mondays:
5.
flightCalendar.disabledDays=[1];
Select Control > Test Movie.
6.
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
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
on page
67.
A DateChooser component supports the following styles:
Style
themeColor
backgroundColor
borderColor
selectableRange
).
"Using styles to customize component color and text"
Theme Description
Halo
The glow color for the rollover and selected dates. Possible
values are
default value is
Both
The background color. The default value is 0xEFEBEF (light
gray).
Both
The border color. The default value is 0x919999.
The DateChooser component uses a solid single-pixel line as
its border. This border cannot be modified through styles or
skinning.
property in an ActionScript object that
rangeStart
setSize()
,
"haloGreen"
"haloBlue"
.
"haloGreen"
DateChooser component (Flash Professional only)
and
. This defines an
rangeEnd
method (see
, and
"haloOrange"
. The
351
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?