MACROMEDIA FLASH MX 2004-USING FLASH Use Manual page 308

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

Advertisement

To request the data, use the
must access the array using numeric indices; that is,
array, use the following statement:
for(var i=0; i < myArray.length; i++);
The expression
for(var i in myArray)
To control lazy decoding, you use ActionScript. For more information, see
"SOAPCall.doLazyDecoding" in Using Components.
Transfer objects in the DataSet component
It is important to remember that the DataSet component is a collection of transfer objects. This
differs from previous implementations of the component, when it was simply an in-memory
cache of data (array of record objects). Transfer objects expose business data from an external data
source through public properties or accessor methods. When you load data into the DataSet
component, the data is translated into a collection of transfer objects. In the simplest scenario, the
DataSet component creates and loads the data into anonymous objects. Each anonymous object
implements the TransferObject interface, which is all that is required for the DataSet component
to manage the objects. The DataSet component tracks changes made to the data and any method
calls that are made on the objects. If methods are called on an anonymous object, nothing
happens, because the methods don't exist. However, the DataSet component tracks them in the
DeltaPacket, which guarantees that they will be sent to the external data source, where they can be
called if appropriate.
In an enterprise solution you could create a client-side ActionScript transfer object that mirrors a
server-side transfer object. This client object can implement additional methods for manipulating
the data or applying client-side constraints. Developers can use the
the DataSet component to identify the class name of the client-side transfer object that should be
created. In this scenario, the DataSet component generates multiple instances of the specified
class and initializes it with the loaded data. When
component, the
object.
If you take the enterprise solution one step further, you could implement a client-side transfer
object that uses web services or Flash Remoting. In this scenario, the object makes direct calls on
the server in addition to possibly storing the calls in the DeltaPacket.
Note: You can create a custom transfer object for use by the DataSet component by creating a class
that implements the TransferObject interface. For more information on the TransferObject interface,
see "TransferObject interface" in Using Components.
308
Chapter 14: Data Integration (Flash Professional Only)
myArray[myIndex]
is used to create an empty instance of the client-side transfer
itemClassName
ActionScript expression, as for any array. You
must be a number. To iterate over the
myIndex
won't work in this case.
is called on the DataSet
addItem()
parameter of
itemClassName

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents