Automatic slideshow made with Multi State Box and how can I get a code for transition animation?

I have made an automatic slideshow with Multi State Box and I would like to make a smooth transition between the states.

This is the code for the slideshow:

$w.onReady(function () {
var states = [‘state2’, ‘state1’, ‘state3’, ‘state4’];
var stateNumber = 0;

function slideShow() {
    $w('#multiStateBox1').changeState(states[stateNumber]);
    if (stateNumber<states.length - 1) {
        stateNumber++;
    } else {
        stateNumber = 0;
    }
    setTimeout(slideShow,3000);
}
slideShow();

});

How can I make a smooth transition between the slides?

Hey @user1429 ,

Your code looks great. Unfortunately atm, there are no smooth transition options on multi-state boxes. There is a known issue where, if you try to add animation to the boxes, it breaks the code.

See here: Editor X Multistate box slideshow code has stopped working

If you really want to have smooth transitions, I believe you’ll have to try a layouter or an actual slideshow until this issue gets fixed.