I need to use a button to trigger a symbol instance, the symbol is sitting on the main timeline, name of symbol is ZoomInSequence
So for the button to run this I have the following
OnMouseClick Run javascript
var symbolInstance = hypeDocument.getSymbolInstanceById(‘ZoomInSequence’);
symbolInstance.startTimelineNamed(‘Main Timeline’, hypeDocument.kDirectionForward);
The function is calledZoom
javascript looks like this:
function Zoom( hypedocument, element,event)
{
var symbolInstance = hypeDocument.getSymbolInstanceById(‘ZoomInSequence’);
symbolInstance.startTimelineNamed(‘Main Timeline’, hypeDocument.kDirectionForward);
}
I cannot get this to work
anyone?
R
Can you share your document or an example?
h_classen
(Hans-Gerd Claßen)
3
you may struggle with id and name of an element.
If you just want to start any hypebehaviour, you can use custombehaviour instead of scripting
so here are both opportunities:
link
startSymbolTimeline.hype.zip (16.1 KB)
1 Like
h_classen
(Hans-Gerd Claßen)
5
you should – at least – read the answers given … could save you time
1 Like
DBear
6
You haven’t given your Symbol an ID. You need to give it an ID in the Identity Inspector.
As Hans says though you could just use a custom behaviour. Set one up inside the symbol and you can access it from outside.
1 Like
Will do and report back thanks