Change image when pressed?

Hey guys, I’m trying to set up a system where when I press an image, it changes the picture, is this possible to do? At the minute all my image code contains is:

    local fly = display.newImageRect( "flyingfly.png", 40, 40 )     fly.x, fly.y = 160, -100     fly.rotation = 15

Check out this forum post for information on this topic:

http://forums.coronalabs.com/topic/33446-swapping-image-for-image-or-sprite/

Looks good to me, thanks.

Check out this forum post for information on this topic:

http://forums.coronalabs.com/topic/33446-swapping-image-for-image-or-sprite/

Looks good to me, thanks.