Editor X Multistate box slideshow code has stopped working

Hi, I have a multistate box slideshow on my homepage and the code has stopped working.
The slideshow should automatically cycle through the states but goes blank after the first transition. The code hasn’t changed and was working fine for months.
I got the code from an excellent video by [WixStudioTips]
The velo help team haven’t been able to say why this is happening so if anyone can help or provide an alternative code to achieve the same thing it would be massively appreciated.
I know the layouter will achieve a similar effect but I think the multistae box way looks a lot better (if it works).
This is the current code:

$w.onReady(function () {
    var states = ['state1', 'state2', 'state3', 'state4', 'state5','state6', 'state7'];
    var stateNumber = 0;

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

Many thanks in advance

This code looks correct to me. Have the names of the states changed? Any output/errors on your browser’s console?

Thank you so much for replying Anthony.
I literally just had a reply from the velo help team. It’s apparently a ‘known issue’ that disables the code if you have entrance animations active on the states???
It’s pretty annoying as the ability to customise is one of the reasons I didn’t just use the layouter slideshow in the first place, however…
I’ve disabled these (hopefully temporarily) and the code now works.
Thanks again.

Hi @user1416 -

Yeah, I had the same issue. Very annoying.

Have you tried coding the animations using a timeline?(Assuming you were using the built-in animations and not coding…) Does anyone know if these work with multistate boxes?

Thanks for the feedback. Will share internally!