When I try to access the currentIndex of a proGallery slideshow I'm working with, the console log displays 'undefined'. Any help much appreciated. I've pasted the code below.
$w.onReady(function () {
setTimeout(proGalleryCheck, 500);
});
function proGalleryCheck() {
$w("#gallery1").onCurrentItemChanged((event) => {
let currentIndex = $w(“#gallery1”).currentIndex; // 3
console.log(i)
console.log(currentIndex)
i = i + 1
if (i == 5) {
i = 0
}
//console.log(event.itemIndex)
});
}