xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx">
import mx.core.BitmapAsset;
[Embed(source="a.gif")]
[Bindable]
public var imgCls:Class;
public var varOne:String = "This is a public variable";
private function modImage():void {
// Create an object from the embed class.
// Since the embedded image is a GIF file,
// the data type is BitmapAsset.
var imgObj:BitmapAsset = new imgCls() as BitmapAsset;
// Modify the object.
imgObj.bitmapData.noise(4);
// Write the modified object to the Image control.
myImage.source=imgObj;
}