Batch operation

A batch operation lets you perform multiple image manipulations on an image as part of one operation, instead of performing the operations individually. You upload an image to the server, use the batch operation to perform multiple Image operations on it, and get the modified image back from the server. To use this action, use an associative array of actions and corresponding attributes. It is easier to create an associative array in ActionScript than MXML.

The following example shows code to create the associative array with the action information and perform the batch operation:

ActionScript Part:

[Bindable] 
public var attributes:Array = 
[{AddBorder:{color:"Red",thickness:"50"}}, 
{Resize:{width:"50%",height:"50%",interpolation:"blackman",blurfactor:"2"}}, 
{Flip:{transpose:"270"}}] 

MXML Part:

<!-- batch operation -- 
<cf:Image id="img" action="batchoperation" 
source="http://localhost:8500/cat.jpg" 
attributes="{attributes}"/>