Getting the SymbolInstance for an element inside of a symbol

Ok. I think I realise what you want to do. The code Stephen supplied is really for getting the parent symbol of the element that triggered the function.

What you seem to need is to get an element within a symbol. And the function is triggered by an external action.

You need to give the symbol an id and then you can get the symbol using:

hypeDocument.getSymbolInstanceById('menuSymbol');

This example has a button that when clicked simulates a score . When the score reaches 4 the symbol menu button will appear.

showButtonIn Symbol.hype.zip (13.4 KB)

Note: the button is shown when the score is greater than or equal to 4.
Which means the timeline to show the button would keep firing on each new score after the score reaches and goes beyond 4.

I used a simple true/false check to stop that.
But depending on how you need it you can do similar in other ways. like set the timeline to a relative one instead of a absolute one. Which means that the time line will go to the end of the timeline from what ever position the button is already in. In an absolute on it would jump to the beginning position first and then work to the end.

The button in my example is also set to show instantly so you would not notice the repeat transition but that may not be what you want…