setChildIndex , issue

I’m trying to set the the index/z order of objectx use the y value as a base,
: MapObjects i derived from MovieClip
perspthings is an associated array
setZOrder the function is called after a mouse event,
so my code is as follows 1/2 derived from books etc.

 
 
public function setZOrder():void
{
 
   var perspthingsNum:int = perspThings.length;
   perspThings.sortOn("x", Array.DESCENDING | Array.NUMERIC);
    perspThings.reverse();
 
    for(var i:uint = 0; i <  perspthingsNum ; i++)
    {
        var toSortMO:MapObjects = perspThings*;
       toSortMO.parent.setChildIndex(toSortMO, i);
    }
  }

The problem after it is called it appears the x position becomes 0
and the scaleX becomes close to 1 or 0 just making a thin streak on the screen
Trace however reveals this isnt the case.
Anyone ideas thanks.