Deactivating actions during scrolling using a finger

scrolling

(Peter Nowak) #1

I purchased Hype Pro some weeks ago and I am really happy with it.

Scrolling/Moving a site from top to down or from left to right using a finger on a mobile device the defined scene actions should be deactivated. Could somebody give me the information what I need to do to realize this.

Thank You
Peter


How to make a fixed background image?
#2

Hi Peter,

Welcome to Hype Pro!

You need to elaborate a little more on the “scene actions” perhaps also .zip up a document and share by dragging into the message window.

That way we can see what you need rather than try to guess.


(Jonathan Deutsch) #3

If you’re looking to disable the “rubberband” scrolling of a page, you can add this code to an On Scene Load event for your first scene (or modify it to run in the script head if that doesn’t suit your purpose):

	var preventScroll = function (event) {
		event.stopPropagation();
		event.preventDefault();
	}
	var docElement = hypeDocument.getElementById(hypeDocument.documentId());
	
	if(docElement.addEventListener) {
		docElement.addEventListener('touchmove', preventScroll, true);
	}	

(Peter Nowak) #4

Dear Jonathan,

the possibility of scrolling a page I want to keep. Just during scrolling of a page using a finger on a mobile device the scene actions should be deactivated. After finishing the scrolling the scene actions should be activated again.

At the moment during scrolling a page using a finger and touching a jpg with a ‘go to scene x’ command I am going directly to this scene.

A ‘go to a scene x’ command should be activated after finishing the scrolling.

Using a mouse everything is working fine. But using a finger at the touch screen not. I hope you understand my problem.

Kind regards
Peter


#5

If you uncheck ‘Use Touch Events’ in the Document Inspector this will increase the delay between when the touchstart action occurs and when the related action occurs. This might have other consequences which you can get more background info on here: http://tumult.com/hype/documentation/3.0/#element-touch-actions