Dataset Class (Flash Professional Only) - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

15.
To bind the selected index of the DataSet component to the selected index of the DataGrid
component, select the DataGrid component on the Stage and click the Add Binding (+)
button again in the Component inspector.
16.
In the dialog box that appears, select "selectedIndex : Number". Click OK.
17.
Double-click the Bound To field in the Component inspector to open the Bound To
dialog box.
18.
In the Component Path field, select "DataSet <user_ds>" from the Component Path
column and then select "selectedIndex : Number" from the Schema Location column.
19.
Enter the following code in the Actions panel:
next_button.addEventListener("click", nextBtnClick);
function nextBtnClick(evt_obj:Object):Void {
user_ds.next();
}
This code uses the
object's collection of items. Since you had previously bound the
of the DataGrid object to the same property of the DataSet object, changing the current
item in the DataSet object changes the current (selected) item in the DataGrid object
as well.
20.
Save the file, and select Control > Test Movie to test the SWF file.
The DataGrid object is populated with the specified items. Notice how clicking the
button changes the selected item in the DataGrid object.

DataSet class (Flash Professional only)

Inheritance
MovieClip > DataSet
ActionScript Class Name
The DataSet component lets you work with data as collections of objects that can be indexed,
sorted, searched, filtered, and modified.
The DataSet component functionality includes DataSetIterator, a set of methods for
traversing and manipulating a data collection, and DeltaPacket, a set of interfaces and classes
for working with updates to a data collection. In most cases, you don't use these classes and
interfaces directly; you use them indirectly through methods provided by the DataSet class.
method to navigate to the next item in the DataSet
DataSet.next()
mx.data.components.DataSet
selectedIndex
DataSet class (Flash Professional only)
property
335

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents