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.
elbowtoe
(Brian)
February 14, 2017, 3:28am
3
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
elbowtoe
(Brian)
February 14, 2017, 3:48am
5
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
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
elbowtoe
(Brian)
May 11, 2018, 3:05pm
10
I should reword. If you want to not be constrained in your interactivity, then you should learn Javascript.
1 Like
Tutinom
(Michael Tutino )
October 2, 2018, 12:31pm
11
1 Like