Problem: How to retrieve a variable nested within a symbol?
I’m running away from Adobe Animate, and in that program I was able to retrieve variables declared inside multiple symbol instances nested in another by doing something like this:
for (i=1; i<=4; i++){
console.log (exportRoot.mySymbol[‘f’+i].myVar);
};
Reading the forums and chatting with Google’s AI I’ve found this similar solution for Saola
for (i=1; i<=4; i++){
var targetSymDoc = AtomiSaola.topDocs[0].getElement(“mySymbol”).getSymbolDoc().getElement(‘f’+i);
targetSymDoc.setProperty(‘rotateZ’, 90); // This… I just made to check if I was targeting the symbols correctly by rotating them, and yes, it does rotate each of the four symbols
//ALL of this console logs return undefined… why? how can I retrieve the value? each symbols has a function at the very first frame with this.suma = 1;
console.log(targetSymDoc.suma);
console.log(targetSymDoc.getDoc().suma);
console.log(targetSymDoc.getSymbolDoc().suma);
};
Saola Animate version: 3.1.4
OS: Mac Tahoe 26.2
Notes: