Do you have a timeline you want to loop? Here's how:
Here's step-by-step:
Place the playhead at the end of the timeline you wish to loop.
Click the + button on the Timeline actions area to create a new action
In the overlay that appears, select ‘Start Timeline’, then select the name of the timeline that you wish to loop (the current timeline).
Add another timeline action at the beginning of the same timeline to 'Continue Timeline'.
'Play in Reverse' immediately starts that timeline from the current point in reverse.
If you want to loop just the end of a timeline, create a 'Go to time in Timeline' action. Whenever the playhead crosses that point, your timeline will jump to the time you set.
The 'Loop' toggle in the timeline controls will loop your animation within Hype, but will not have any effect on your export. This is useful for getting the timing of your animation just right.
Well in the flashworld we would build a loop and after the loop counter finishes it would jump to a specific label on the time line. Labels are not yet here in Hype.
This is the loopcounter I normally would use:
if (isNaN(count) || count == undefined) {
var count:Number = 1;
}
else {
count++;
}
if (count == 2) {
gotoAndStop("final");
}
I made a small sketch of what I would like the timeline to do in Hype (yes, I have a nice steady drawing hand):
But me being me, maybe I am thinking to complex. So I should maybe think differently and add a few more seconds after the final timeline is done and once the loop has repeated itself 2 times, it should continue the timeline after a specific point.
I did understand the timeline Edge Animation had. There one could jump between timeline points with labels, like in Flash. See the screenshot.
In a test I did while waiting for your reply. This is exactly what I did. Which worked but when we say probably we mean yes you can jump to a point on the timeline. Bu twe use the word probably because we are unclear of your exact needs and therefore cannot say 100% percent that what you want can be done.
Jumping to anywhere on a time line is easily done through code or GUI. In GUI I mean timeline Actions after the repeat time that has an action to "go to time on time line"
It would be better if you posted your example Project so we get a better idea of what you goal is.
( P.sI do not and have never used Flash so have no idea what you mean by Labels. I suspect they are similar to timeline Actions. )
Then updated the code inside the loop.counter action:
window.loopCounter++;
if (window.loopCounter <= 2) {
hypeDocument.startTimelineNamed('loop', hypeDocument.kDirectionForward)
}
if (window.loopCounter == 2) {
hypeDocument.goToTimeInTimelineNamed(12.21, 'final') // set.time to end, jump to empty named action
hypeDocument.pauseTimelineNamed('final') // this needs to be here or the timeline will continue
}
Now what would be nice if I could add this: hypeDocument.kDirectionReverse to see if it would play backwards and not jump. UPDATE: Just tested it… don’t work. But that is a compromise I will accept for the time being. The main problem is solved. See the short mp4: 300x250_MR_BDF_wechseljahre3.mp4 (2.1 MB)