MACROMEDIA FLASH MX 2004-USING FLASH Use Manual page 292

Hide thumbs Also See for FLASH MX 2004-USING FLASH:
Table of Contents

Advertisement

Default settings
describes the uses for these settings:
If a field's value is undefined, the default value is used whenever the value of the field is used as
the source of a data binding. For example, the data fields of a DataSet component, or the
property of a connector component, can have an undefined value.
results
When you create a new row of data in a DataSet component, the default value is used as the
value of newly created records
Using kinds and encoders
Kinds and encoders are drop-in modules that perform additional special processing of the data of
a schema item. They are often used with each other to accomplish common tasks. The following
list describes common uses for kinds and encoders:
Calculated DataSet Fields
underlying data tables. Calculated fields provide developers with the ability to create and update
dynamic field values at runtime. This is convenient for calculating and displaying values based on
calculations or concatenations performed other fields located in a record (for instance, you can
create a calculated field that combines the first and last name fields together to display the full
name to a user).
To set up a calculated field for the DataSet component:
Select the DataSet component, and click the Schema tab in the Component inspector.
1.
Click the Add a Component Property (+) button. This step adds a field to the schema.
2.
Using the Schema Attributes pane, give the new component property a field name, and set its
3.
kind to
calculated
In ActionScript code, use the
4.
a value at runtime.
Note: You should assign a value to a calculated field only within the DataSet component's
event.
calcFields
For an ActionScript code example, see
Setting up schemas for XML documents
Sometimes you want the fields of an XML document to be available as data types other than
String. The following example shows an application that pulls in data from an XML file:
<datapacket>
<row id="1" billable="ON" rate="50" hours="3" />
<row id="2" billable="OFF" rate="50" hours="6" />
</datapacket>
If you use this XML file to import a schema for the XMLConnector component's
property, it generates the following code:
results : XML
datapacket : Object
row : Array
[n] : object
292
Chapter 14: Data Integration (Flash Professional Only)
These settings let you set defaults for various situations. The following list
Calculated fields are virtual fields that do not exist in the
.
calcFields
"Schema kinds" on page
event of the DataSet component to assign this field
294.
In an XML document, all data is stored as a string.
results

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents