Advertisement
zebadeee

HYPE multi pauses

Dec 22nd, 2020
700
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // This establishes the T1 variable as an integer.
  2. var T1 = 0;
  3.  
  4. // Listen to the 'timeupdate' value:
  5. hypeDocument.getElementById('video1').addEventListener('timeupdate', function() {
  6. var currentTime = hypeDocument.getElementById('video1').currentTime;
  7.  
  8. // If the current time is greater than 5, run the RedRobin timeline.
  9. if (currentTime >= 5 && T1 == 0) {
  10. hypeDocument.startTimelineNamed('RedRobin');
  11.  
  12. // This ensures that the 'startTimelineNamed' action only occurs once, not at every point beyond time = 5.
  13. T1 = T1 + 1;
  14. }
  15. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement