Jim, The FeatureLayer is added to the top of the toc because of this block of code in the TOC.as registerMapLayer function: } else if (layer is FeatureLayer) {
var msName:String = FeatureLayer(layer).url.replace("FeatureServer","MapServer");
if(msName.substring(msName.length - 9) != "MapServer")
{
var arc:ArcGISDynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer(msName.substring(0,msName.lastIndexOf("/")));
if(arc.loaded){
tocItem.ttooltip = arc.serviceDescription
}else{
ready = false;
arc.addEventListener(LayerEvent.LOAD,
function(event:LayerEvent):void{
tocItem.ttooltip = ArcGISDynamicMapServiceLayer(event.layer).serviceDescription;
_tocRoots.addItemAt(tocItem, 0);
if(_expanded) expandItem(tocItem, true, true, false, null);
});
}
}
}