I have multiple symbols on the main timeline with incremental instance names : player1, player2, player3
How can I reference these symbols with a string variable?
currentPlayer = 1
"player"+currentPlayer would reference "player1" for example
Is there a way to programatically reference these instances with a string variable? Or is there another way to reference these symbols without explicity calling them by name?
Use bracket notation. For example:
this["player" + currentPlayer].play();
Got it! it is
Thanks for the replies!