How do I get all the symbol display names in the scene?

Hello to everyone,

I’m new to Hype,

How do I get to the screen name of all the symbols on the stage?

[Symbol4, SymbolA, Symbol] Like this,

Is there any method or function that returns an array?

I apologize for english use google translation :sweat_smile:

Maybe something like this in the head.

 <script>
 window.symbolNames = []
	function myCallback(hypeDocument, element, event) {
  

  window.symbolNames.push(hypeDocument.getSymbolInstanceById(element.id).symbolName())



    return true;
  }

  if("HYPE_eventListeners" in window === false) {
    window.HYPE_eventListeners = Array();
  }
  window.HYPE_eventListeners.push({"type":"HypeSymbolLoad", "callback":myCallback});

 </script>
2 Likes

Thank you MarkHunte.

it works.:grinning:

1 Like

Clever idea using the HypeSymbolLoad callback! My solution required using a classname then looking up from classname -> element id -> symbol instance -> symbol name.

1 Like