TransferObject.clone()

Availability

Flash Player 7.

Edition

Flash MX Professional 2004.

Usage

class itemClass implements mx.data.to.TransferObject {
    function clone() {
        // Your code here.
    }
}

Parameters

None.

Returns

A copy of the transfer object.

Description

Method; creates an instance of the transfer object. The implementation of this method creates a copy of the existing transfer object and its properties and then returns that object.

Example

The following function returns a copy of this transfer object with all of the properties set to the same values as the original:

class itemClass implements mx.data.to.TransferObject {
    function clone():Object {
        var copy:itemClass = new itemClass(); 
        for (var p in this) {
            copy[p]= this[p]; 
        }
        return(copy);
    }
}