MACROMEDIA FLASH MX 2004-USING FLASH Use Manual page 272

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

Advertisement

Next, set the DataGrid index default value to 0 to make it available for data binding: select the
6.
instance, click the Schema tab, select
menu_dg
Value field in the lower pane, type
Save and test the application. Click Load Data, then click different items in the data grid. The
7.
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.
Note: 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.
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
If a binding is created for any of these items, an
Binding Attributes pane, so that an index can be specified for the row array. Flash uses the [n]
schema field to identify this type of relationship. Therefore, you might need to duplicate this
entry if you are manually creating a schema. To do this, you add a new schema field under the
node and set Field Name for the schema field to
row : Array
and creates an
index for
About debugging data binding and web services (Flash Professional only)
Data binding is a series of actions that occur in response to events, such as the following:
The data of a component property changes.
A web service call is completed.
An XML document is fetched.
You can create a log of all actions that are performed by data binding or web services. To create
the log, create a new Log object by adding the following code to the first frame in your Flash
document:
_global.__dataLogger=new mx.data.binding.Log();
To turn the trace log off, use the following code:
_global.__dataLogger=null; //disable trace for binding.
272
Chapter 14: Data Integration (Flash Professional Only)
.
0
index for 'row'
property if it is used within a binding.
selectedIndex:number
property appears in the
. The compiler reads this value
[n]
//to enable trace log
, and in the Default

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents