It is not quite working for me.
So let’s say I want this line to be created:
back.pIcon1._x = 100;
Would I not use:
i = 1;
_root[“back.pIcon”+i]._x = 100;
not quite. As I said, the example was for stuff located on the main timeline because of the _root thingy. When ever you are using the brackets to create a dynamic name inside an OOP object call you have to start from the _root and work your way up the string. You can also use parent to go back up the string, but I wont go into that yet.
In the above case you would use
i = 1;
_root.back[“pIcon”+i]._x = 100;
notice that the dot isn’t really taken out after the “_root” but before the first bracket. The reason is not entirely clear to me. It is possible that it is part of the structure of OOP because objects within other objects are sort of properties of the parents. Property names can be accessed like arrays in a/s. Arrays use brackets to name each of their elements. Not sure if that makes any sense at all, but just keep in mind the structure of it, and you really wont need to worry too much right now as to the whys.