# How to retrieve a variable nested within a symbol?

**URL:** <https://talk.atomisystems.com/t/how-to-retrieve-a-variable-nested-within-a-symbol/9997>\
**Category:** Support Questions\
**Created:** [February 9, 2026, 4:06am UTC](https://talk.atomisystems.com/t/how-to-retrieve-a-variable-nested-within-a-symbol/9997 "2026-02-09T04:06:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Enrique](https://talk.atomisystems.com/user_avatar/talk.atomisystems.com/enrique/32/6506_2.png) [@Enrique](https://talk.atomisystems.com/u/Enrique)\
**Post date:** [February 9, 2026, 4:06am UTC](https://talk.atomisystems.com/t/how-to-retrieve-a-variable-nested-within-a-symbol/9997/1 "2026-02-09T04:06:29Z")

</div>

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:

---

<div class="post-metadata">

**Author:** ![Enrique](https://talk.atomisystems.com/user_avatar/talk.atomisystems.com/enrique/32/6506_2.png) [@Enrique](https://talk.atomisystems.com/u/Enrique)\
**Post date:** [February 9, 2026, 6:34pm UTC](https://talk.atomisystems.com/t/how-to-retrieve-a-variable-nested-within-a-symbol/9997/2 "2026-02-09T18:34:38Z")

</div>

Ok… Nevermind… I’m starting to like Google’s AI Mode, seems, like using .this alone won’t work in Saola because “This is a classic scoping issue in Saola Animate. The confusion stems from the fact that `this` inside a symbol function and the `targetSymDoc` object are not always pointing to the exact same place for variable storage.”

So, I need to declare my variable inside the symbol as: this.getDoc().suma = 1;

Now everything seems to work. Declarations, functions and console logs both inside and outside the symbols are working.
