
Data binding (Flash Professional only)
409
5.
Click
Index for ‘food’
, click the magnifying glass icon, deselect Use Constant Value,
select the
menu_dg
DataGrid instance, and select
selectedIndex:Number
. The settings for
the indexed binding appear in the Bindings tab, as shown in the following image:
6.
Next, set the DataGrid index default value to 0 to make it available for data binding: select
the
menu_dg
instance, click the Schema tab, select
selectedIndex:number
, and in the
Default Value field in the lower pane, type
0
.
7.
Save and test the application. Click Load Data, then click different items in the data grid.
The text area updates with the detailed description for each food item. Each time the user
selects a new item in the data grid, the index of the array is updated to show the data
associated with the new item.
Sometimes you might need to manually define a schema that identifies a schema item as a
field of an object contained within an array. In the following example, the id, billable, rate,
and duration schema fields are all considered attributes of an object contained within the row
array:
results : XML
datapacket : Object
row : Array
[n] : object
@id : Integer
@billable : Boolean
@rate : Number
@duration : Integer
NO
TE
The
index for
property appears only in the Binding attributes pane for a schema
item that is the field of an object within an array.
Summary of Contents for FLASH 8-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 ...