(AGK version: 2019.12.16)
Submitted: 2019-12-29 14:16:43
//put 2 images in your media folder. 1.gif and 2.gif

first = LoadImage ( "1.gif" )
second = LoadImage ( "2.gif" )

//create a sprite showing the first image
sprite = CreateSprite ( first )

SetSpritePosition ( sprite, 100, 100 )

do
    //when the mouse is clicked, update the image of the sprite to the second
    if GetPointerPressed ( ) = 1
      SetSpriteImage ( sprite, second )
    endif
    Sync()
loop
Help make AGK better by submitting an example for this command!
(All examples are subject to approval)
Login to post an example of your own.