 		 * @private
 		 */
 		private var resize:Resize;
+
+        /**
+         * @private
+         */
+        private var resizeInstance:ResizeInstance;
+
+        /**
+         * @private
+         */
+        private var resetExplicitHeight:Boolean;
 		
         /**
          * @private
          */
         protected function runResizeEffect():void {
 			if(resize && resize.isPlaying) {
+                // before the call to end() returns, the onEffectEnd method will have been called
+                // for the currently playing resize.
 				resize.end();
 			}
 			

            //default scroll policies are off
            this.verticalScrollPolicy = ScrollPolicy.OFF;
            this.horizontalScrollPolicy = ScrollPolicy.OFF;
        }

        protected function createOrReplaceHeaderButton():void {

            }
            
            resize = new Resize(this);

            // If this WindowShade currently has no explicit height set, we want to
            // restore that state when the resize effect is finished, in the onEffectEnd method.
            // If it does, then the final height set by the effect will be retained.
            resetExplicitHeight = isNaN(explicitHeight);

            resize.heightTo = Math.min(maxHeight, measuredHeight);

            resize.duration = duration;

            var instances:Array = resize.play();
            if(instances && instances.length) {
                resizeInstance = instances[0];
            }
        }

        /**
         * @private
         */
        protected function onEffectEnd(evt:EffectEvent):void {
            // Make sure this is our effect ending
            if(evt.effectInstance == resizeInstance) {
                if(resetExplicitHeight) explicitHeight = NaN;
                resizeInstance = null;
            }
        }

        /**
