Manage the timelines of a symbol with a button outside the symbol

I would like to pause a timeline of a symbol + go to the start of another timeline (of the same symbol) by clicking on a button that is outside the symbol => so I don't have access to the symbol's timelines unless I add a javascript function.
I tried this function when clicking the button:

function test(hypeDocument, element, event) {
	hypeDocument.getSymbolInstanceById('idofthesymbol').goToTimeInTimelineNamed(0, 'nametimelineinthesymbol');

But it doesn't work, why?
Thank you in advance for your help :slight_smile:

You can add Custom Behaviours in the symbol and then trigger them from a button action outside of the symbol. (20.5 KB)

Screenshot 2021-05-31 at 13.38.53


Cool ! Thank you :smiley:

1 Like