Start symbol timeline from outside symbol

I'm triying to start a Symbol timeline from outside the Symbol with this:

hypeDocument.startTimelineNamed('Presentacion_interactiva', hypeDocument.kDirectionForward);

and I've not response. Console says:
ERROR: timeline named 'Presentacion_interactiva' not found

but the timeline exists.
Can anybody tell me something please?

You need to get the symbol instance first and ask it to start it's timeline.
Symbols are effectively hypeDocuments themselves.

The standard way is to give the symbol an ID. and then use the hypeDocument.getSymbolInstanceById() API to find and assign it to a var.

Then tell it to start it's own timeline.

var presentSymbol = hypeDocument.getSymbolInstanceById('presentacion')
presentSymbol.startTimelineNamed('Presentacion_interactiva', hypeDocument.kDirectionForward);

There are other ways of accessing a Symbols Timeline. Which do not involve coding.

1 Like