<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2008/08/13/exploring-the-new-states-syntax-in-flex-gumbo/ -->
<Application xmlns="http://ns.adobe.com/mxml/2009"
        xmlns:mx="library:adobe/flex/halo"
        layout="flex.layout.BasicLayout"
        viewSourceURL="srcview/index.html">

    <states>
        <State name="state1" />
        <State name="state2" />
        <State name="state3" />
    </states>

    <mx:HBox left="10" top="10">
        <Button label="State 1 (red)"
                click="currentState='state1';" />
        <Button label="State 2 (green)"
                click="currentState='state2';" />
        <Button label="State 3 (blue)"
            click="currentState='state3';" />
    </mx:HBox>

    <Rect id="rect"
            width="100"
            height="100"
            horizontalCenter="0"
            verticalCenter="0">
        <fill>
            <SolidColor color.state1="red"
                    color.state2="haloGreen"
                    color.state3="haloBlue" />
        </fill>
    </Rect>

</Application>