You can use something like this:
private function findChildrenInModel(name:String, object:ObjectContainer3D,
output:Array):void
{
var res:Object3D;
for each(var child:Object3D in object.children)
{
if(child.name && child.name.indexOf(name) != -1)
{
res = child;
output.push(res);
}
if(child is ObjectContainer3D)
findChildrenInModel(name, child as ObjectContainer3D,
output);
}
}
This method recursively analyzes the children of a container to find objects
that contain a given string in its name. Any possible candidates are pushed
into the output array passed as a parameter.
You could easily tweak this function to trace out a hierarchy under the
passed object container and hence observe your node hierarchy.
Li