                 IndexChangedEvent.CHILD_INDEX_CHANGE, childIndexChangeHandler);
 
             var numViews:int = targetStack.numChildren;
-            var child:INavigatorContent;
+            var child:Container;
 
             for (var i:int = 0; i < numViews; i++)
 	        {
-                child = INavigatorContent(targetStack.getChildAt(i));
+                child = Container(targetStack.getChildAt(i));
 
                 child.removeEventListener("labelChanged", labelChangedHandler);
                 child.removeEventListener("iconChanged", iconChangedHandler);

        if (event.relatedObject.parent != targetStack)
            return;

        var newChild:INavigatorContent = INavigatorContent(event.relatedObject);
        var item:Button = Button(createNavItem(itemToLabel(newChild), newChild.icon));
        var index:int = newChild.parent.getChildIndex(DisplayObject(newChild));
        setChildIndex(item, index);

import mx.containers.BoxDirection;
import mx.containers.ViewStack;
import mx.core.ClassFactory;
import mx.core.Container;
import mx.core.FlexVersion;
import mx.core.IFactory;
import mx.core.IFlexDisplayObject;
