Change Timing of Specific Slide in a slideshow w/ Wix Code?

I need to know if this is possible. I am using slide show to display a number of very very short all caps questions on screen, followed by 1 side that has 2 additional lines of info.

Requirements:

  • I obviously need this to autoplay which it does already, but it loops and hence I have a problem

  • I either need it to stop at the end of last slide and do not re-autoplay…
    OR

  • I need to significantly increase the timer on this particular end slide long enough to make it practically like a stop in context of user flow and time spent on any page or area of the page.

Are either of above possible with custom coding using Wix code?

Thanks
Omid

As another idea and I will have to test this in a few hours as I have to rush out now, I could use a HIDE or COLLAPSE function after a set timer or after displaying the last before last slide… in which case, I can then trigger a regular pemanent text to appear as my last slide maybe with a button that could trigger that whole thing to replay… but I dont really care for that bit as much right now. However, I still cannot quite figure out if it would be possible to do a show/hide or collapse/expand based on a timer.

This was the only example I found

It seems timer is possible to be incorporated inside of Wix Code which may make my need handlable already without any further hard coding or tricks but remaining open to any better ideas.

 import {ShowDelayHide, ShowOneOf} from 'public/showHide'; 
 let yellow, orange, red, captions;
  $w.onReady(function () { 
   yellow = new ShowDelayHide(50, $w('#yellowImage')); 
   orange = new ShowDelayHide(50, $w('#orangeImage')); 
   red = new ShowDelayHide(50, $w('#redImage')); 
   captions = new ShowOneOf(50, $w('#yellowGroup'), $w('#orangeGroup'), $w('#redGroup')); 
   }); 

Hi Omid,

A bit similar to this post … you can use setTimeout() or setInterval() combined with Slideshow API .

Good luck,
Liran.

1 Like

Liran,

You guys rock. I now understand what you guys have been doing in silence and every single day I work on sites, I keep confirming the beauties of it. This is pretty darn good stuff.

I found everything I needed. I should perhaps fully searched this API before every single post, because some things in here are just out of my imagination. Like I said, you guys rock! :clap: :clap: :clap:

So let me ask for just a little more help here if you do not mind

On the last slide, I want the slideshow to pause, and then I want an animation of an external element to trigger with a delay at that point.

I think I need to use a combination of:

 function onChange(handler: EventHandler): Slideshow callback EventHandler(event: Event, $w: Function): void 

 function onPause(handler: EventHandler): Gallery | Slideshow callback EventHandler(event: Event, $w: Function): void 
 
 if( $w("#myElement").isPlaying ) { $w("#myElement").pause(); } else { $w("#myElement").play(); } 

But I am having difficulty connecting the dots since I am a noob coder, would you please guide me to the bit of training/documentation material you guys may have that will help me understand how to connect the dots better? Is it all going to be within this API or are there, shall we say more user-friendly EDUCATIONAL type resources available outside of the obvious Examples and Articles that teach us the set of things, aka the very basics of how things operate here, things we will need to know to manipulate any of this to desirable results? I feel like they are just alphabetically ordered and placed within this massive API reference which makes it a bit needlessly difficult for a beginner programmer like myself to quite clearly see what I need to see. If I do not quite know what to search for, I will be stuck. Now do not get me wrong, I do my own playing and learning or educated guessing from what I see, but I am also not in school nor have time for slow learning, I am trying to turn a profit here using all these great tools. However, it seems like I am missing some very obvious and basic bits and having a hard time in tracking them all down in a timely or efficient manner. Any clues will help. And No, I am not asking you to code this for me at all. I want to learn more efficiently is all.

Like I had to look under the example for js playground to fine a similar if then example to what I am trying to learn and do here, which really helps me understand it better, I just wish it was easier to find such examples, there were more of them, and maybe, just maybe, if there would be a way to search from a box, all the coded bits of all examples at once, similar to how the predicted API search works, so that when I am trying to learn IF/then syntax and bits related to my goal, I do not have to study and search for a whole hour to learn 5 lines of code.

  if (['32', '34', '36'].indexOf(code) > -1) {       $w('#weatherImageLight').src =  "image://v1/4bc52e_0b2bcd511f394757bee151c63eeee72a~mv2.png/537_516/Day-Sunny.png";       $w('#slideshow').changeSlide(1);     }     else if (['8', '9', '10', '11', '12', '17',          '35', '38', '39', '40', '47'].indexOf(code) > -1) {       $w('#weatherImageLight').src =  "image://v1/4bc52e_e70b58345a924f3b88305ee8be5af271~mv2.png/540_519/Rainy-Day.png"       $w('#slideshow').changeSlide(0);     } 

I find the search box on the API reference, and the way it works, quite helpful for a beginner like myself. Just wish it was all like that across the forums and examples and articles search boxes so that things would be easier to locate. A bit more examples and more organized and categorized versions of them will also help beginners such as myself. Currently, I find the videos, articles, and examples rather aimless and coreless… their language, their aim, their audience, all seems a little bit confused and vague, some seem super basic for noobs like me, some are like translated spoken words of a foreign coder who expects me to know the full API or have the time to study 50 other pages of data before I can understand what the heck it is saying. And there is no glue, no basic course or basic 1 hour video I can read or watch that tells me ok, we use these basic js bits for these common needs, and we use these other basic wix syntax regularly as we code… It is all over the place in too many irrelevant videos and articles to my needs if I am to properly learn it.

The learning curve is what I am trying to point to, it is just not made easy, it almost seems like it has been ignored or purposefully left HARD TO LEARN when it comes to any custom needs by noobs like me. I hope this feedback helps you guys improve this a bit further on that side. I feel like a critical 5% of the effort is leaving a 95% experience for me, and when I add up time and monetary losses, it starts to look uneconomical to try and get fancy. I need a bridge to the other side before I can raise prices…

1 Like

Hi Omid,
Thanks for the feedback, it is very important for us and is definitely taken into consideration.

I know getting started with code can be a but frustrating, but usually, the learning curve that you’re talking about is starting a bit slow, and then comes a point when it goes up really fast.

In the meantime, I think that you should focus on your ability to break down a big requirement into small ones (just like you did here).
Then, you’ll be able to ask the exact question here and we will help you easily.
Anyway, I wouldn’t want you to get frustrated with that, so please… if you see you’re spending a lot of time looking for resources, just write a forum post, we will be happy to point you to the best resource for your requirement.

Liran.

I’m looking to make the first slide play for 20 seconds then the others 5 seconds each. Is there a way to do this? I haven’t messed with any of the wix code, actually not sure where to look for that just yet, but if it’s as simple as adjusting some figures in the code or adding a snippet I can do that. Any help is appreciated.