Mike Orth – Booya!

Flex, Actionscript

Archive for the 'Skinning' Category

Skinning Flex 4 slides, Uber-Basic Example Button Skin

Here are my slides from Flex Flash Camp along with an uber-basic example button skin that shows a quick breakdown of a Spark Skin. Great for those who haven’t had time yet to really peer into Flex 4 skins. Look for more advanced skinning topics soon.

<?xml version="1.0" encoding="utf-8"?>
<!--
     UBER-BASIC BUTTON SKIN EXAMPLE
       Demonstates:
         - States
         - FXG Graphics
         - Skin Parts  
     Mike Orth 2009
-->
<s:Skin
    xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/halo"
    >
   
   
    <fx:Metadata>
        [HostComponent("spark.components.Button")]
    </fx:Metadata>
   
    <!--SKIN STATES-->
    <s:states>
        <mx:State name="up"/>
        <mx:State name="down"/>
        <mx:State name="over"/>
        <mx:State name="disabled"/>
    </s:states>
   
   
    <!--graphical elements-->
    <s:Rect top="0" bottom="0" left="0" right="0">

        <s:stroke>
            <mx:SolidColorStroke color="0x000000"/>
        </s:stroke>
        <s:fill>
            <mx:SolidColor color="0xFF00CC"/>
        </s:fill>
    </s:Rect>
   
    <!--SKIN PARTS-->
    <s:SimpleText id="labelElement"
        top="5" bottom="5" left="20" right="20" />
</s:Skin>
3 comments

Google Tracking Code