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