<?xml version="1.0" encoding="utf-8"?>
<!---
Effect Sample (Wipe)
-->
<s:Application
    xmlns:fx      = "http://ns.adobe.com/mxml/2009"
    xmlns:s       = "library://ns.adobe.com/flex/spark"
    xmlns:mx      = "library://ns.adobe.com/flex/halo"
    minWidth      = "1024"
    minHeight     = "768"
    viewSourceURL = "srcview/index.html"
>

    <fx:Style>
        @namespace mx "library://ns.adobe.com/flex/halo";
        @namespace s  "library://ns.adobe.com/flex/spark";
        s|Button {
            font-size : 40;
        }
    </fx:Style>

    <fx:Script>
        <![CDATA[
            import spark.effects.WipeDirection;
            protected override function createChildren() : void {
                super.createChildren();
                currentState = "aState";
            }
        ]]>
    </fx:Script>

    <s:layout>
        <s:VerticalLayout horizontalAlign="center" />
    </s:layout>

    <s:states>
        <mx:State name="aState" />
        <mx:State name="bState" />
    </s:states>

    <s:transitions>
        <s:Transition>
            <s:Parallel duration="1000">
                <s:Wipe target="{button_up}"    direction="{WipeDirection.UP}"    />
                <s:Wipe target="{button_left}"  direction="{WipeDirection.LEFT}"  />
                <s:Wipe target="{button_right}" direction="{WipeDirection.RIGHT}" />
                <s:Wipe target="{button_down}"  direction="{WipeDirection.DOWN}"  />
            </s:Parallel>
        </s:Transition>
    </s:transitions>

    <s:Button
        id           = "button_up"
        width        = "400"
        height       = "100"
        label.aState = "wipe up"
        label.bState = "WIPE UP"
        click        = "currentState= (currentState=='aState') ? 'bState' : 'aState'"
     />

    <s:Button
        id           = "button_left"
        width        = "400"
        height       = "100"
        label.aState = "wipe left"
        label.bState = "WIPE LEFT"
        click        = "currentState= (currentState=='aState') ? 'bState' : 'aState'"
     />

    <s:Button
        id           = "button_right"
        width        = "400"
        height       = "100"
        label.aState = "wipe right"
        label.bState = "WIPE RIGHT"
        click        = "currentState= (currentState=='aState') ? 'bState' : 'aState'"
     />

    <s:Button
        id           = "button_down"
        width        = "400"
        height       = "100"
        label.aState = "wipe down"
        label.bState = "WIPE DOWN"
        click        = "currentState= (currentState=='aState') ? 'bState' : 'aState'"
     />

</s:Application>