xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark">
import mx.core.BitmapAsset;
[Embed(source='a.jpg')]
[Bindable]
public var beforeImage:Class;
[Bindable]
public var beforeImageBitmap:BitmapAsset = new beforeImage();
[Embed(source='a.jpg')]
[Bindable]
public var afterImage:Class;
[Bindable]
public var afterImageBitmap:BitmapAsset = new afterImage();
bitmapFrom="{beforeImageBitmap.bitmapData}" bitmapTo="{afterImageBitmap.bitmapData}"
effectEnd="myImage.source=afterImage;" />
bitmapFrom="{afterImageBitmap.bitmapData}" bitmapTo="{beforeImageBitmap.bitmapData}"
effectEnd="myImage.source=beforeImage;" />