Mobile Swiping Left and Right


(Carey) #1

Hello! I want to see if what I have planned for mobile swiping will work. I’m having trouble being able to test it because I have an android (not iphone to use hype reflect).

On each scene I have a left and a right arrow. Left arrow when clicked on takes you to the previous scene with this code:

			hypeDocument.showPreviousScene(hypeDocument.kSceneTransitionInstant)

Right arrow when clicked on takes you to the next scene with this code:

	hypeDocument.showNextScene(hypeDocument.kSceneTransitionCrossfade, 0.0001)

I am thinking to put the previnstant/same code as left arrow for previous scene with “Swipe Right” and put the nextinstant/same code as right arrow for next scene with “Swipe Left”

Should that work as I am imagining it?

Thank you so much!


Vimeo Audio and Video - load and unload
#2

Yup, though for your right arrow, you could use:

hypeDocument.showNextScene(hypeDocument.kSceneTransitionInstant)

… since is practically the same as .0001.

If you create two separate JavaScript functions for these it is a nice way to abstract this out so that you can easily change it in the future if you wish.


#3

@caverbook – Maybe this thread could help you. This are some sliding tabs, but the main principle should be the same: