Play an animation from main loop

I want to have a button so when it is pressed it toggles the checked flag and have an event that when the checked flag is checked then an animation starts and runs continuously until I click the button again which would toggle the checked state to unchecked and stop the animation.

What have you tried so far?

Looking thru the event settings there is nothing for stopping an animation.


  • SquareLine Studio version: 1.0.2
  • Operating system: Windows 10
  • Target hardware: esp32


At this moment you can do it only with custom event handlers. I created a project which shows how to do it. The magic is in

It looks like this:

And the project: (9.5 KB)

Project from ZIP file should work in SLS as is it shown here or we should use it with some simulator? If I import this project and try to run it, I get this error:


I tried this with SLS 1.0.4 & 1.0.5 .

It’s because now SLS adds ui_ prefix to widget names to be sure they not conflict with reserved words or other variables.

All you need to do is replacing all 3 occurrences of Panel1 with ui_Panel1 in

1 Like