I have some Cubes which are owned by ObjectContainer3D. I want to
listen all of this objects throught "parent", but can't understand how
can I do it.
some function which creates this cubes :
private function createCubes():void
{
for (var i:int=0; i<15; i++)
{
cubeArray[i]=new Cube();
cubeArray[i].x=120-(i*50);
group.addChild(cubeArray[i]);
}
}
and I want to listen all these cubes, and tween that cube on which is
mouse over up throught Caurina, and want to know it index
group.addOnMouseOver(addOnMouseOverObject);
private function addOnMouseOverObject(e:MouseEvent3D)
{
searchPhotoIndex(e.target);
}
private function searchPhotoIndex(searchElement:Object3D):void
{
for (var i:int=0; i<16; i++)
{
if (cubeArray[i]==searchElement)
{
searchPhotoIndexVar=i;
}
}
}
So, how can I know index of this cube?