- When you trace e.target what do you get? - You use "for (var i:int=0; i<16; i++)" in searchPhotoIndex but have "for (var i:int=0; i<15; i++)" in createCubes.
When looping through an array, a vector or the children of an ObjectContainer3D you don't need to hardcode the length: myArray.length; myVector.length; MyObjectContainer3D.children.length; You should be able to do away with cubeArray and get the index using: searchPhotoIndexVar = group.children.indexOf(searchElement); (If the searchElement argument is not found, the return value is -1.) ath. Jerome
