
Advanced topics in data integration
435
If you use this XML file to import a schema for the XMLConnector component’s
results
property, it generates the following code:
results : XML
datapacket : Object
row : Array
[n] : object
@billable: String
@hours : Integer
@id : Integer
@rate : Integer
Suppose you want to treat the row node as a record within a grid, and you want the
@billable
attribute to be treated as a Boolean value and show a
true
or
false
value in the
grid instead of
ON
or
OFF
. Getting the data into the grid is simple: You can simply bind the row
schema field to the
dataProvider
property of the grid. The following procedure describes
how to get the
@billable
attribute to be treated as a Boolean value and display a
true
or
false
value.
To make the @billable attribute display a true or false value:
1.
Select the XMLConnector component, click the Schema tab, and select the @billable
schema field.
2.
In the bottom pane of the Schema tab, set the
data type
property to Boolean.
3.
Set the
encoder
property to Boolean.
4.
Select Encoder Options and enter
on
for strings that represent
true,
and enter
off
for
strings that represent
false
.
The encoder now takes the XML data in its raw form (String) and converts it into an
ActionScript Boolean value. Using the encoder options, it knows how to encode the string
values correctly.
5.
Click Formatter, and select Boolean. Select Formatter Options. You now have a choice to
define how a
true
and
false
value should appear as a string.
6.
Enter
True
for strings that mean
true,
and enter
False
for strings that mean
false
.
The formatter now takes the ActionScript Boolean value and formats it into a String.
Summary of Contents for FLASH 8-USING FLASH
Page 1: ...Using Flash...
Page 12: ...12 Contents...
Page 110: ...110 Using Symbols Instances and Library Assets...
Page 128: ...128 Working with Color Strokes and Fills...
Page 156: ...156 Drawing...
Page 190: ...190 Working with Text...
Page 224: ...224 Working with Graphic Objects...
Page 270: ...270 Creating Motion...
Page 310: ...310 Working with Video...
Page 362: ...362 Working with Screens Flash Professional Only...
Page 386: ...386 Creating Multilanguage Text...
Page 454: ...454 Data Integration Flash Professional Only...
Page 500: ...500 Publishing...
Page 534: ...534 Creating Accessible Content...