434
Data Integration (Flash Professional Only)
Default settings
These settings let you set defaults for various situations. The following list
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
results
property of a connector component, can have an undefined value.
■
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
Calculated fields are virtual fields that do not exist in the
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:
1.
Select the DataSet component, and click the Schema tab in the Component inspector.
2.
Click the Add a Component Property (+) button. This step adds a field to the schema.
3.
Using the Schema Attributes pane, give the new component property a field name, and set
its kind to
calculated
.
4.
In ActionScript code, use the
calcFields
event of the DataSet component to assign this
field a value at runtime.
For an ActionScript code example, see
“Schema kinds” on page 436
.
Setting up schemas for XML documents
In an XML document, all data is stored as a
string. 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>
NO
T
E
You should assign a value to a calculated field only within the DataSet component’s
calcFields
event.
Содержание FLASH 8-FLASH
Страница 1: ...Using Flash ...
Страница 12: ...12 Contents ...
Страница 110: ...110 Using Symbols Instances and Library Assets ...
Страница 128: ...128 Working with Color Strokes and Fills ...
Страница 156: ...156 Drawing ...
Страница 190: ...190 Working with Text ...
Страница 224: ...224 Working with Graphic Objects ...
Страница 270: ...270 Creating Motion ...
Страница 310: ...310 Working with Video ...
Страница 362: ...362 Working with Screens Flash Professional Only ...
Страница 386: ...386 Creating Multilanguage Text ...
Страница 454: ...454 Data Integration Flash Professional Only ...
Страница 500: ...500 Publishing ...
Страница 534: ...534 Creating Accessible Content ...