When I want to loop through instance names like: “tile1”, “tile2” etc.
I use a code like this:
for(var i=0;i<=10;i++)
{
this["tile"+i]._x=300;
}
but when I put these MC’s inside an MC (which I’ve named: “ground”) for some reason this code:
for(var i=0;i<=10;i++)
{
_root.ground.this["tile"+i]._x=300;
}
doesn’t work.
WHY?
and another question, is there a way to loop through all the objects inside a movieclip without giving each one an instance name?
thanks.