Problem using function emit and on

I’m trying to implement a button that hides the entire interface when clicked, for that I use hostspot but there is an interface that is in a supersymbol (fotomacronew2estatico).
When I click on bot1, I perform the action and trigger the “parent.emit(“custom:teste”);”
which is received by the supersymbol
Uploading: img1.png…

“const test = symbol.symbolDefinitions.Planta_emolecolas().nodes.bot1;


The problem is your reference to the subsymbol!
You have to set the reference in the code from the root, not from symbol definitions.

const teste = symbol.nodes.Planta_emolecolas.nodes.bot1