286 Data Integration: Using XML for a Timesheet (Flash Professional Only)
23.
Using the same method, create the following new fields:
Field Name = billable, Data Type = Boolean
Field Name = date, Data Type = Date
Field Name = duration, Data Type = Number
Field Name = rate, Data Type = Number
The field names must exactly match the names of their corresponding
properties within the XMLConnector component (@date = date, @billable
= billable, @duration = duration), including capitalization.
24.
Select the Date field that you just created. Select the encoder setting and
change it to DateToNumber.
The DataSet component needs to store date values internally in their
numeric format so that they can be sorted correctly. The DateToNumber
encoder converts a date into a number whenever the value is set. It
converts a number into a date whenever the value is accessed.
25.
With the Date field still selected, double-click the Formatter field in the
Component inspector and select Date from the pop-up menu.
26.
Double-click the Formatter Options field in the Component inspector.
27.
In the Date Formatter Settings dialog box that appears, enter MM-DD-
YYYY in the Format text box.
Add DataGrid and Button components
Next you will add components for displaying the data.
1.
From the Components panel, open the User Interface category and drag
a DataGrid component to the Stage.
2.
In the Property inspector enter the instance name timeInfo_grd.
3.
Still in the Property inspector, set the Width to 360.
Need help?
Do you have a question about the FLASH 8-FLASH and is the answer not in the manual?
Questions and answers