Slideshow with transitions and auto-advance

If you’ve ever given a presentation before then you’re probably already familiar with slide transitions.
In the past, we’ve covered how to create a simple slideshow app, but the navigation was pretty basic and there were no fancy transitions to move between images or slides. In this tutorial we’re going to look at how to mimic those two things in your Thunkable apps.

Finished Product

This is what the final app looks like, with the ability to swipe through the images and captions, or to have the app loop through them automatically.

Design

The “fade out, fade in” effect is made possible by layering rows. The layer on the bottom has the image and the layer on the top acts a little like a camera shutter, “opening” and “closing” to reveal the next image in the slide deck.

The final component tree looks like this.The bottom row contains the swipeLeft and swipeRight buttom, so that users can “swipe” from the edge of the screen. In the middle, the ImageRow is used to display the pictures, and on top of that the top row contains two transparent buttons, again for swiping left and right.
31

Blocks

The app has three variables, one for the list index and two for the lists themselves:
variables

The buttons on the left side of the screen are used to handle what happens when the user swipes right…
left_buttons

…and similarly, the buttons to the right of the screen are for swiping left through the slides.
right_buttons

The fading function is the most interesting part of this app - it mimics the middle row fading out and then in again by changing the opacity of the top row. It’s very simple, but it looks great.

Auto-scrolling

By putting the fade out / fade in blocks into their own procedure it’s very easy to then use a timer to progress automatically.

Remix this app

Like this app?

Remix it for yourself!
https://x.thunkable.com/projectPage/5d668777b7e30f19d15c4bfc

10 Likes

This is very useful! Thank you for sharing :slight_smile:

Do you have any suggestion for the cross fading of two images?

e.x.

Time>>>>>>>>>>>
image1 <Opacity 0 ------------> 1>
image2 <Opacity 1 ------------> 0>

Thank you!

1 Like

Hey!,
this is very useful but for some reason I can’t remix the app.

When I click on it it says “Error copying shared project via link”

Is it just me ?

Can u please give me another link?

1 Like

Thanks @wikilinks.infooleua0, here’s the link:

https://x.thunkable.com/projectPage/5d668777b7e30f19d15c4bfc

I’ve updated the link in my first post too. This project could probably do with an update too.

1 Like

This tutorial was so helpful!!! I have one question: How do you make each image into a button (each image goes to different pages/links/things) but still “slideable”?
Thank you!!!

1 Like

@pythonwarriors2021 I’d use a parallel list for this

So for example, if image1 is clicked go to link1, image2 goes to link2 and so on!

1 Like

So I think the question was more “how do you layout the invisible buttons to make clicking the image possible?” At least, that’s my question. If the two buttons for swiping are overlaid on everything, how will an image click get through?

2 Likes

Great question…I hadn’t thought of that! :joy:

Hmmm…ok, let me have a think and see if I can come up with anything @catsarisky !

4 Likes