Trigger symbol timeline from main timeline

I’m trying to get a symbol timeline to start by clicking a button on the main timeline. But I can’t figure out how to tell the button which timeline to play.

I’m not clear on timelines. When I edit the symbol, the animations inside the symbol should be placed along the symbol’s timeline right? But when I return to the main timeline to tell the button to start the symbol timline, I can’t find any reference to it. How is the button going to know which timeline to trigger?

Any help appreciated.

2 Likes

You need to get a reference to the symbol instance by it’s ID then you can target that timeline.

var instance = hypeDocument.getSymbolInstanceById(“someInstanceName”);
instance.startTimelineNamed(“whateverYourTimelineNameIs”, hypeDocument.kDirectionForward);

2 Likes

Do I have to use Javascript? I bought Hype because it was supposed to be simple and easy to use.

1 Like

If you want to make something interactive, then yes, you need to code.

Thanks for your reply. I hate Java. Is there another way? Custom behaviors?

Plus are there any good tutorials? Lynda.com is out of date.

Demo Hype Project: CustBehaviorSymbol_JHSv1.hype.zip (16.8 KB)

The button "RotateSquare" triggers (On Mouse Click) the Custom Behavior "RotateSquare".

This Custom Behaviour was created in the symbol "Square". The behavior runs the symbol's "Main Timeline" which rotates the square.

1 Like

https://www.skillshare.com/classes/Building-Responsive-HTML5-with-Tumult-Hype-3-Pro/1432541614/classroom/discussions?via=search-layout-grid&enrolledRedirect=1

Please don’t tell people that. It is not true!!

As @JimScott has shown You do NOT need JavaScript to be interactive

It does help in many cases and is well worth learning the basics as it does give you more versatility.

2 Likes

I should reword. If you want to not be constrained in your interactivity, then you should learn Javascript.

1 Like

Custom behaviors is what you are looking for: https://tumult.com/hype/documentation/3.0/#behaviors

1 Like