<?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 (Rect)"
                click="currentState='state1';" />
        <Button label="State 2 (Ellipse)"
                click="currentState='state2';" />
        <Button label="State 3 (Path)"
            click="currentState='state3';" />
    </mx:HBox>

    <Rect id="rect"
            width="100"
            height="100"
            horizontalCenter="0"
            verticalCenter="0"
            includeIn="state1">
        <fill>
            <SolidColor color="red" />
        </fill>
    </Rect>

    <Ellipse id="ellipse"
            width="100"
            height="100"
            horizontalCenter="0"
            verticalCenter="0"
            includeIn="state2">
        <fill>
            <SolidColor color="red" />
        </fill>
    </Ellipse>

    <Path id="path"
            data="M 0 0 L 100 100 Z M 0 100 L 100 0 Z"
            horizontalCenter="0"
            verticalCenter="0"
            includeIn="state3">
        <stroke>
            <SolidColorStroke color="red" weight="10" />
        </stroke>
    </Path>

</Application>