Upvote 1

how to create an image loop

In Progress Kimberly Nguyen 3 years ago


I'm just trying to create an image loop (loop for an infinite amount) on page load to simulate an animation. Is there a way to do this?



Replies (1)


Hi Kim,

The easiest way to do this is to create "On Variable Change" events. Here's how to do this:

1. Create a variable, name it "Loop" and set its default value to 0.

2. Create an "On Page Load" + "Set Value" event, and have it set the value of the variable to 1.

3. Create an "On Variable Change" + "Rotate" event for the image. Have it rotate the image Offset - 360 degrees, with linear easing.

4. Add another action after that event. Make it an "On Variable Change" + "Set Value" event. Have it set the value to the variable as 'Calculated'. In the calculated expression builder, drag the variable into the first space, then a '+', then '1'. It should look like "Loop + 1".

I've attached the prototype. Let me know if you have any questions.

Leave a Comment
Attach a file