First things first … the reason for lack of replies is that it’s the weekend so no need to bump. Perhaps, a note to say that it’s quite urgent within the first post may have gathered a few replies but as I said it’s the weekend and generally it’s quieter on the forums.
That being said, you also may want to highlight your code by clicking the button in the toolbar above this text box. This will format the code so it’s easier to see like this…
HYPE.documents['NPM Family Intro ENG'].goToTimeInTimelineNamed(60, 'Main Timeline', HYPE.documents['NPM Family Intro ENG'])
On to the possible solution.
Basically, when accessing a Hype document from outside it’s scope you would replace every instance of hypeDocument
with HYPE.documents['My Document Name']
as you have done (in places).
So to issue a “continue timeline” command you would use the API’s
// hypeDocument.continueTimelineNamed(timelineName, direction, canRestartTimeline)
hypeDocument.continueTimelineNamed('timelineName', hypeDocument.kDirectionForward, false)
So, this would become
HYPE.documents['My Document Name'].continueTimelineNamed('timelineName', HYPE.documents['My Document Name'].kDirectionForward, false)
Now, in your code above you have
HYPE.documents['NPM Family Intro ENG'].goToTimeInTimelineNamed(60, 'Main Timeline', HYPE.documents['NPM Family Intro ENG'])
and this is 95% correct but you do not need the last ‘HYPE.documents’ call as the API method is
hypeDocument.goToTimeInTimelineNamed(timeInSeconds, timelineName)
and in the next one you have
HYPE.documents['NPM Family Intro ENG'].hypeDocument.continueTimelineNamed('Main Timeline', HYPE.documents['NPM Family Intro ENG'], HYPE.documents['NPM Family Intro ENG'].hypeDocument.kDirectionForward, false)
which is a whole heap of wrong. As stated above you only need to replace the hypeDocument with HYPE.documents[‘my Doc’]
So, your code should really read
HYPE.documents['NPM Family Intro ENG'].goToTimeInTimelineNamed(60, 'Main Timeline')
// and
HYPE.documents['NPM Family Intro ENG'].continueTimelineNamed('Main Timeline', HYPE.documents['NPM Family Intro ENG'].kDirectionForward, false)
If you also omit the direction the default will be forward so you don’t have to include that if you don’t want.