Container Flex


    
        
            import mx.core.IVisualElement;
            import spark.components.supportClasses.GroupBase;
            
            private var currentIndex:int = 0;
            private function swapDepths():void
            {
                var layoutTarget:GroupBase = bLayout.target;
                var element:IVisualElement;
                for( var i:int = 0; i < layoutTarget.numElements; i++ )
                {
                    element = layoutTarget.getElementAt( i ) as IVisualElement;
                    element.depth = i;
                }
            }