Mega Code Archive
Use load() method to replace a small image with a large image when the user clicks a button
private var imageSmall:String = "a.jpg";
private var imageLarge:String = "a.jpg";
private function toggleImage():void {
// Runtime location of the images is the same folder
// as this MXML file.
if (image1.source == imageSmall) {
image1.load(imageLarge);
} else {
image1.load(imageSmall);
}
}