Is it possible to get the index of a child in a group? If it is accessed using event.target, how can I find what it’s index number is? [import]uid: 3018 topic_id: 1271 reply_id: 301271[/import]
Suggestion:
Loop through a targets parent and compare the parent.child to the target.If they are equal, you have index.
Why do you need it? [import]uid: 5712 topic_id: 1271 reply_id: 3404[/import]
Thanks, I hadn’t thought of that. I’m moving sprites between groups and want to insert them back in their original position in the group as I later cycle through the group to move the sprites. I’m using the group to access each sprite - it may be better practice to do this using a table but this seems easier. [import]uid: 3018 topic_id: 1271 reply_id: 3405[/import]
A group is basically a table! [import]uid: 5712 topic_id: 1271 reply_id: 3406[/import]