Hi,
I have a small animation with music playing on background. Music starts on a loadscene event.
It works well on any browser except chrome. This browser only accepts to play the musci by clicking on a button.
So, I’d like to modify my animation by sending Chrome users on a specific timeline with a button to start music.
I tried this javascript but it doesn’t seem to work :
There's an extra closing parenthesis at the end. It should work if this is fixed (assuming the timeline names are correct and start/continue behavior is what you want).
Bonjour,
merci pour cette proposition malheureusement elle ne fonctionne pas.
J’ai l’impression le javascript ne se lance pas.
J’ai modifié le script comme suit :
var isChrome = window.chrome && typeof window.chrome === “object”;
// hypeDocument.continueTimelineNamed(‘Introduction’, hypeDocument.kDirectionForward, false));
// continue timeline B
}
pour vérifier que le “else” se faisait.
Conclusion :
Hype continue ma timeline Introduction et ne lance pas “For_Google2” comme il devrait.
Faut-il une boucle indéfinie pour continuer le test ?
Merci d’avance
Bonjour Jonathan,
j’ai testé avec la parenthèse en mois : rien de changé.
J’ai essayé la même astuce que pour l’autre proposition : aucune des 2 timelines n’est lancée.
Est-il possible que la fonction ne soit pas lancée lors de l’action “SI charger scene” ?
Hi @DBear Dbear and @jonathan,
I tried several things to test if working :
I previewed the animation under Safari (Run javascript is activated in the preferences) : it didn’t work either
I modified the animation : I put a button at the beginning of the main timeline with the run of the javascript on click event. Then I put the suspend timeline action just after it. I tested it on the two browsers : it didn’t work
In order to be sure that javascript is running, il modified the function for only running this command " hypeDocument.startTimelineNamed(‘For_google2’, hypeDocument.kDirectionForward);". I tested on both bowsers : it didn’t work. So it seems that javascript isn’t running.
I can’t understand what is mismatching ? Can anyone help ?
Thanks a lot. Best regards