Desactivate touch event when timeline pause


#1

hello, i don’t find how simply remove a swipe event on a pause timeline keyframe.

i have several scene and i use for each swipe event in the inspector scene :
if (event.type == “HypeSwipeUpAction”){
hypeDocument.continueTimelineNamed(‘Main Timeline’, hypeDocument.kDirectionReverse, false);
} else if (event.type == “HypeSwipeDownAction”){
hypeDocument.continueTimelineNamed(‘Main Timeline’, hypeDocument.kDirectionForward, false);
}

thank you


(Jonathan Deutsch) #2

I’d probably take the approach of on the swipe events to see if the timeline is paused; if not then run the action. So you’d set your ‘On Swipe Up’ (etc) action handlers in Hype’s UI to Run Javascript, and then use code like:

if(hypeDocument.isPlayingTimelineNamed("theTimelineName") == true) {
    //... do whatever action you wanted
}

#3

yes ! I had not thought… thank
i will try