My code is working in preview, but no working when published.

@michaeldiascoach
Normaly when you add some events to your element, the code is written automaticaly into the right code-section…

But sometimes this connection can get lost, so that no action is running after a click. So you will have to reconnect your element with the code-function again.

Or you can do it another way…

$w.onReady(()=>{
    let mySlides = $w("#fullWidthSlides4").slides;  
    let numSlides = mySlides.length;  
    
    $w('#image22').onClick(()=>{ $w("#fullWidthSlides4").changeSlide(1)}
    $w('#button11').onClick(()=>{ $w("#fullWidthSlides4").changeSlide(0)}
    $w('#button12').onClick(()=>{ $w("#fullWidthSlides4").changeSlide(0)}
    //.....and so on ....
})