Skinning

Definition:

            It  is the process of changing the appearance of component by

modifying or replacing its visual elements. These elements can be made up

of images, SWF files, or class files that contain drawing API methods. Flex

components can be reskinned without changing their functionality.

           Skins can be applied to components with various states. For example,

the button control which has many skins for various states. It can be defined

using the downSkin, upSkin & overSkin style properties to represent the way

the button control appears when it is down, up, & over the control. We can

achieve this either by Graphically or Programmatically.

Source Code:

<?xml version=”1.0″ encoding=”utf-8″?>

<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml”

layout=”absolute”>
 
<mx:Style>
 
Button
 
{
  
overSkin: Embed(”../images/beige_background.jpg”);
  
upSkin: Embed(”../images/blue_background.jpg”);
  
downSkin: Embed(”../images/ga7.jpg”, scaleGridTop=6,
       
scaleGridLeft=15,
       
scaleGridBottom=10,
       
scaleGridRight=50 );
 
}
 
</mx:Style>
  
 <mx:Button />

</mx:Application>

 

With Regards

Hemakumar.S

Respond to this post