         graphics.drawRect(1, 1, unscaledWidth - 1, unscaledHeight - 1);
         graphics.endFill();
     }
+    
+    /**
+     *  Returns the borderClass to use based on the currentState
+     * 
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5 
+     *  @productversion Flex 4.5
+     */
+    protected function getBorderClassForCurrentState():Class
+    {
+        if (currentState == "down") 
+            return downBorderSkin;
+        else
+            return upBorderSkin;
+    }
 
 }
 }
import flash.display.GradientType;
import flash.geom.Matrix;

import mx.states.SetProperty;
import mx.states.State;
import mx.utils.ColorUtil;

    {   
        super.commitCurrentState();
        
        borderClass = getBorderClassForCurrentState();
        
        if (!(bgImg is borderClass))
        {
