Is it possible to make a gif animation happen when I press a button?


I am learning to work with images on the OutSystems platform and I was curious to know if it is possible to configure so that a button, when pressed, makes the animation of a GIF happen. 

Thank you very much again in advance!

Kind Regards,

Luiz Jucá

Rank: #89

Hi Luiz,

For the mentioned use-case, I would suggest you to toggle the normal Image with GIF image on the button click

i.e. introduce an IF widget in the UI screen and within the True branch add a static image and in the False branch add a GIF image and toggle the IF control Boolean value on the button click

See this sample app

Hope this helps you!


Benjith Sam 

Rank: #19

Hi Luiz,

Thinking quickly about your approach, I'd say it's easier to have two animations, one for heads, and another for tails (crown is the literal translation of the Portuguese expression I guess ?? ). Why do I suggest this?... because as far as I know you won't be able to tell when the GIF animation finishes. So you'd need to decide which animation you'd want to display beforehand (swap steps 3 and 4 on your list).

You may also want to check this course on Animations in OutSystems applications (I haven't checked it, but seems to be aligned to what you may need).

Hope this helps!

Yes, here in brazil we call it "Cara ou Coroa" when we toss a coin... and i used google translator to avoid mistakes hehehe...

I am going to watch this course that you suggested today and see if I am successful today with this experiment.

Also, I learned in this post from Eduardo that we can configure it from the outside and make the gif have a certain amount of loops. I'll test to see how it works.

Thank you Jorge!!!