Good morning everyone, I have a new Custom Interaction experiment to share with you all today.
In this one I have created an animation that changes the background image of a Bloc with a nice cinematic zoom. ![]()
This effect is created with a single Custom Interaction and 5 classes.

The Classes ![]()
This experiment requires a class for each background image (background-1, background-2, background-3). These classes just have the background image assigned.
A class to handle the zoom animation (animate-bg).
And a class to position the images correctly on the mask layer (loop-bg).
The Mask ![]()
Like my previous rotating gradient background experiment, I’m going to use the mask layer again.
- I’ll set the mask to solid with a 50% colour fill.
- Next I’ll select the mask in the layer tree and apply an ID to it #overlay-mask.
- Finally I’ll assign the initial classes to the mask layer that will show the first image (background-1) and set the background image positioning (loop-bg).
The Interaction ![]()
The custom interaction for this experiment uses 8 rules to create the looping background image zoom effect. It basically applies a new class to the #overlay-mask for each background image every 3 seconds and then re-loops on itself (repeats).
Finally, I assign this interaction to be triggered on page load.
That’s a wrap, the cinematic zoom experiment is complete. ![]()
![]()
Adding more images ![]()
If you wanted to extend this to use more images you would need to create additional background classes (background-4, background-5), extend the interaction rules to add those classes and finally adjust the transition time in the animate-bg class so the zoom lasts the entire run time of your interaction (this can be calculated by combining all of the interaction pauses).
You can download this experiment here. ![]()
Bloc Image Background Loop.bloc (669.9 KB)
Have fun and a great weekend ![]()
Future improvements ![]()
I wanted to add a transition fade between images on this but it required more classes and was a little more technical, I thought since its early days for the interaction manager I would keep it as simple as possible. I’ll probably come back to this one with improvements in the future.







