Custom event : if "timeline pause"?

Hello,
i have make an animation with scrolling effect with pause timeline and “play” if you scroll.
i wish than an “scrolling to play” symbol appear after 10s if the timeline is pause.

I may do it for each keyframe but i have too many stop.

thank you for your help

Sorry @polysemique

I think this is a little unclear because I am assuming English is not your first language. :slight_smile:

Do you have your document that you can share?

I am assuming that when a person “pauses” your timeline that you want a message to appear (after 10 secs) that tells them to scroll in order to play the timeline again.

If this is the case, you can run a “Javascript function” that counts 10 secs and then shows a timeline with the message animation if there is no “interaction” before that. Basically the count will reset if there is interaction.

If this is what you want then reply with “yes” and someone will share the code that you need.

What is your 1st language. There may also be someone here that can speak it or translate :slight_smile:

Tu parle français? Si oui, pouvez-vous expliquer en français :slight_smile:

2 Likes

YES; merci
:slight_smile: désolé, je ne pensais pas être si catastrophique…

j’ai fais une animation avec un parallax scrolling effect sur plusieurs scène.
j’utilise le code ci-dessous avec des points d’arrêts sur la timeline principal. Je souhaitais faire apparaître un symbol “scroller pour jouer l’animation” quand l’animation est en pause sur la timeline et qu’il n’y a pas de scroll. Je me demandais si il était possible de savoir si la timeline est en pause, sinon il faudrait que je mette à la main le code “timer” à chaque stop (j’en ai presque 100…)
un petit extrait de l’animation ici :
essai.zip (269.9 KB)

if (window.addEventListener) {
window.addEventListener(“mousewheel”, scrollScene, false);
window.addEventListener(“DOMMouseScroll”, scrollScene, false);
window.removeEventListener(“DOMMouseScroll”);
window.removeEventListener(“mousewheel”);
}
function scrollScene(e){
var upORdown = Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail)));
if(upORdown === 1){
hypeDocument.continueTimelineNamed(‘Main Timeline’, hypeDocument.kDirectionReverse);
reverse = 1;
}else{
hypeDocument.continueTimelineNamed(‘Main Timeline’, hypeDocument.kDirectionForward);
reverse = 0;
}}

Bien sûr, il existe une méthode dans l’API Hype qui renvoie true ou false si une timeline est en cours de lecture ou ne en cours de pas. Vous pouvez exécuter une condition qui vérifie ceci:

if (!hypeDocument.isPlayingTimelineNamed(timelineName)) { // not playing
    // do something!
    hypeDocument.startTimelineNamed('scrollGesture');
} else {
    // code for listener
}

Désolé, je vais regarder votre dossier demain. Je suis très occupé aujourd’hui

merci beaucoup !
j’essaye d’avancer d’ici là