Is there a way to get child of ObjectContainer3D by name?

Software: Away3D 4.x

dubletar, Member
Posted: 10 June 2012 07:09 PM   Total Posts: 73

Is there a way to get child of ObjectContainer3D by name?

   

Avatar
Austen, Newbie
Posted: 10 June 2012 11:06 PM   Total Posts: 21   [ # 1 ]

you may push your children in an array to access em easily

childList.push(child);
objectContainer3D.addChild(child)

   

KobeJames, Newbie
Posted: 11 June 2012 01:55 AM   Total Posts: 21   [ # 2 ]

you can set the name or other infomation in “extra” property

for (var i:uint=0;i

   

Richard Olsson, Administrator
Posted: 16 June 2012 11:44 AM   Total Posts: 1192   [ # 3 ]

There is no built-in method to search the scene-graph for objects by name, but you can do a recursive traversal yourself and look at the name property of all the children and their children et c. If you have loaded your assets using the AssetLibrary, you can also find the asset by name through there.

There should be better ways to traverse the display list (including searching by name) and this is something that we intend to add soon, e.g. for Away3D 4.1.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X