ref = "pic" + i; Image(getChildByName(ref)).x = 100;
R. On 3/12/07, dougco2000 <[EMAIL PROTECTED]> wrote:
Perhaps a silly question, but how do you create a reference in AS to point to an object, i.e. an Image? For example, if you have in the mxml: <mx:Image id="pic1" source="images/thisimage.png" /> <mx:Image id="pic2" source="images/thatimage.png" /> <mx:Image id="pic3" source="images/nextimage.png" /> And I want to be able to do something like this in a function: ref = "pic" + i; ref.x = 100; I ended up just creating all the image object in AS through a loop/array and then could easily do this, but I am curious to know if what I was originally trying to do is possible. thanks