There is also the Extension hypeDocument.continueTimelineNamedFromTo in the extensions project
The extension has an example that shows how to play a timeline from time # to time #
Here is a second example.
In the examples code I have add a couple of if conditions that stop a button trying to play if the time line is gone past it's destination time. ( I will probably add that part to the extension itself )
var currentTime= hypeDocument.currentTimeInTimelineNamed('foo1')
var goFromTo_1 = 4
var goFromTo_2 = 8.10
console.log(currentTime)
if (element.id == "goFromTo1"){
if (currentTime < goFromTo_1){
hypeDocument.continueTimelineNamedFromTo("foo1", currentTime, {timeToSeconds:goFromTo_1 , kDirection: hypeDocument.kDirectionForward})
}
}
ContinueTimelineNamedFromTo.extension v1 Example 2.hype.zip (67.1 KB)