Is there a way to "eval" or dynamically set a symbol name that has been parsed from XML to build a symbol path? For example, I'm trying to dynamically set a variable to the path of a sysmbol already on the stage, but it's not working correctly:
var xmlSymName = $('symName', this).text(); // where symName = "sym4" from a parsed XML node var whatPOI = sym.getComposition().getStage().getSymbol("sym1").getSymbol("sym2").getSymbol("sym3").getSymbol(xmlSymName).getSymbolElement();
Basically I have a lot of points on a map and I'd like to be able to name the points along with other data like tooltip callouts, etc populated via XML then loop through the XML to build the points of interest on the map. If I can get the above working I can place that variable path reference into an array and grab the data from it later. But the path is not working the way I have it.
I appreciate any help!
I thought I'd update this in case anyone came across the same situation. This actually does work. I had something else wrong in my code. Carry on.