Swipe Left and Right

Hi peeps,

So i try to made a slide show and i found this post https://www.axure.com/c/forum/6-x-archived-questions/4972-repeating-image-slideshow-carousel.html and do bit a modification. I got an issue that i can’t swipe left or right the promo banner. How can i fix this problem?

Thanks,
Steff

Hi Steff,

The long wait in between panel state changes essentially pauses the axure engine - so any swipes that occur aren’t going to be picked up.

To get around the long pause, I broke down the wait period in 50 ms chunks by reducing a counter. When the counter hits 0, the panel state changes to the next panel and then wraps from the last to the first. This also allows you to get rid of the four separate case statements to advance to the next panel.

I added two hidden widgets - one which stores the value to wait between states (2000 ms) and one which holds the current value and gets reduced by 50 every 50 ms.

On swipe left, i set the panel to the next state and reset the counter. On swipe right, i set the panel to the previous state and again reset the counter.

Take a look at the attached file and let me know if you have any questions.
promo_jasaku.rp (743 KB)

1 Like

Thanks for your help, last question (i wish :‘D) so i copying this slide to my work. Swiping is work but the automatic slide show didn’t work. Did i miss something maybe at ‘OnPageLoad’ event? I try to using show on the OnPageLoad event but it didn’t work :’)


upppppppp :smiley:

Yes, you are missing an event on page load. You need to Move Counter by (0,0).

Hi I’m not a developer. Can you help me to add the condition… if swipe right (or) swipe left - show a right or wrong message

Hi webxfuture,

Since dynamic panels come with specific OnSwipeLeft and OnSwipeRight events, you do not need conditional logic. You can just put the specific show/hide interaction to show the right and wrong message, on the OnSwipeLeft and OnSwipeRight events.

I’ve attached an example file to demonstrate this. Please lmk if I misunderstood, or you have any questions!

OnSwipeLeftorRight.rp (51.0 KB)