             for (var i:int = 0; i < parts.length; i++)
             {
                 var skinPart:SkinPartInfo = parts[i];
+                var skinPartID:String = skinPart.id;
                 
-                if (!(this[skinPart.id] is IFactory))
-                    partRemoved(skinPart.id, this[skinPart.id]);
-                this[skinPart.id] = null;
+                if (!(this[skinPartID] is IFactory))
+                {
+                    partRemoved(skinPartID, this[skinPartID]);
+                }
+                else
+                {
+                    var len:int = numDynamicParts(skinPartID);
+                    for (var j:int = 0; j < len; j++)
+                        removePartInstance(skinPartID, getDynamicPartAt(skinPartID, j));
+                }
+                
+                this[skinPartID] = null;
             }
         }
     }
     
-    /**
-     *  Unload the skin for this component. This method should not be called
-     *  directly. Typically, subclasses will not need to override this method.
-     */
+	/**
+	 *  Unload the skin for this component. This method should not be called
+	 *  directly. Typically, subclasses will not need to override this method.
+	 *
+	 *  This method is called whenever a skin is changed at runtime. It removes the skin,
+	 *  clears all part associations, and calls removeBehaviors().
+	 */
     protected function unloadSkin():void
     {       
         if (skinObject)

            skinChanged = false;
            unloadSkin();
            loadSkin();
        }
    }
    

    
    /**
     *  @private
     *  True if the skin has changed and hasn't gone through validation yet.
     */
    private var skinChanged:Boolean = false;
    
        
    /**
     *  @private
     *  Whether the skin state is invalid or not.
     */
    protected var skinStateIsDirty:Boolean = false;  
}

}
