I am building out a structure for Hype for a client. I decided to take advantage of the automatic id generation for flexibility on multiple layouts, where our team can duplicate symbols, and have the same ids as far as the code is concerned, even though there are multiple instances of the same id.
That is working just fine.
What I am hoping to do is to have say 10 instances of a symbol on stage, and target one specific one. No problem, have that.
I am trying to talk to a timeline in that specific instance of the symbol and tell it to play a timeline that none of the other 9 are playing. But it triggers all 10 instances to play the same timeline in unison.
Is it possible to target an element timeline and not the symbol?
for example:
var instance = hypeDocument.getSymbolInstanceById($(level4TopLeftInstance).attr(‘id’));
instance.startTimelineNamed(‘pulse’, hypeDocument.kDirectionForward);
In my attached project are (2) symbol instances and two buttons. One button fires the timeline for the first instance; and the second button fires the second instance’s timeline. While both timelines are called “Main Timeline” they could have been called something different. Each symbol instance has an unique ID.
The code below fires the “Main Timeline” for each symbol instance.
Thanks, once I ran into it I should have built something more specific. Layering what I was doing into what you sent worked like a charm, so I know there is just a small bug in my code.
I am basically building things out without any specific names, so that on various layouts, I can swap symbols that are customized without having repeated ids.
I figured out a nice algorithm to drill down and get specifics in the nodes, and how the nodes relates to the timeline layers. My test dealt with numerous nested symbols that are all other symbols that are nested two more times over.
Glad You have found your solution. Is your test piece something You can publish here? It could be a valuable learning experience for others (myself included!).