         var localContentHeight:Number = calcContentHeight();
 
         var y:Number = vm.top;
-        var content:Container;
+        var content:UIComponent;
 
         var n:int = numChildren;
         for (var i:int = 0; i < n; i++)


        // Performance optimization: don't call createComponents if we know
        // that createComponents has already been called.
        if (child && child.numChildrenCreated == -1)
            child.createComponentsFromDescriptors();

        // Do the initial measurement/layout pass for the newly-instantiated
        // descendants.

        {
            // Need to set the new index to be visible here
            // in order for effects to work.
            IUIComponent(getChildAt(newIndex)).setVisible(true);

            // Now that the effects have been triggered, we can hide the
            // current view until it is properly sized and positioned below.
            IUIComponent(getChildAt(newIndex)).setVisible(false, true);
            if (oldIndex != -1)
                IUIComponent(getChildAt(oldIndex)).setVisible(false);

            instantiateChild(selectedChild);
        }
