<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!-- <!DOCTYPE Movie SYSTEM "dtd/RVML.dtd"> -->
<Movie version='6' width='600' height='400' rate='1' backgroundColor='white' compressed='No'
    xmlns="http://www.kineticfusion.org/RVML/2.0">
    <Title>
        Button Example
    </Title>
    <Desc>
        Illustrates the definition of a Button symbol. Creates two buttons with differing 
        dragTarget attributes and illustrates the behavioral differences on mouse events. A 
        simple ActionScript event handler is used to alter the timeline position when a 
        button is pressed.
    </Desc>
    <Definitions>

        <!-- Box shape to play around with -->
        <Shape id='BoxOrigin' bounds="auto">
            <LineStyles>
                <LineStyle index="1" width="1" color="red"/>
            </LineStyles>
            <FillStyles>
                <ColorFill index="1" color="lightGrey"/>
            </FillStyles>
            <Edges>
                <SetStyle line="1" mainFill="1"/>
                <Rect x="0" y="0" width="100" height="100"/>
            </Edges>
        </Shape>
        <Button id="testButtonDrag" dragTarget="Yes">
            <Layers>

                <!-- Use Box symbol as source for up and hit layers -->
                <Layer states="(up, hit)" symbol="BoxOrigin" depth="1"/>

                <!-- Increase size of box when the mouse goes over -->
                <Layer states="(over)" symbol="BoxOrigin" depth="1">
                    <Transform scaleX="1.2" scaleY="1.2"/>
                </Layer>

                <!-- Increase size of box when the mouse goes over, change color, and move down and across-->
                <Layer states="(down)" symbol="BoxOrigin" depth="1">
                    <Transform scaleX="1.2" scaleY="1.2" translateX="10" translateY="10"/>
                    <RGBAColorTransform addRed="50" addBlue="40" />
                </Layer>
            </Layers>
            <ButtonActions><![CDATA[
    on(release)
    {

    gotoAndStop( 2);
    }
    ]]></ButtonActions>
        </Button>
        <Button id="testButtonNotDrag" dragTarget="No">
            <Layers>

                <!-- Use Box symbol as source for up and hit layers -->
                <Layer states="(up, hit)" symbol="BoxOrigin" depth="1"/>

                <!-- Increase size of box when the mouse goes over -->
                <Layer states="(over)" symbol="BoxOrigin" depth="1">
                    <Transform scaleX="1.2" scaleY="1.2"/>
                </Layer>

                <!-- Increase size of box when the mouse goes over, change color, and move down and across-->
                <Layer states="(down)" symbol="BoxOrigin" depth="1">
                    <Transform scaleX="1.2" scaleY="1.2" translateX="10" translateY="10"/>
                    <RGBAColorTransform addRed="-50" addGreen="-50" addBlue="20" />
                </Layer>
            </Layers>
            <ButtonActions><![CDATA[
    on(release)
    {

    gotoAndStop( 1);
    }
    ]]>
            </ButtonActions>
        </Button>

        <!-- Elements for informational header -->
        <FontDefinition id='Arial' fontName='Arial' fontStyle='(bold)' fontRange='defined' />
        <EditField id='info' bounds='bounds(0, 0, 0, 0)'  fontID='Arial' fontSize='10.0' color='black' 
            properties='(systemFont, autosize)'>
            <InitialText>1. Press mouse outside button and drag in</InitialText>
        </EditField>
        <EditField id='info2' bounds='bounds(0, 0, 0, 0)'  fontID='Arial' fontSize='10.0' color='black' 
            properties='(systemFont, autosize)'>
            <InitialText>2. Press mouse inside button and drag out</InitialText>
        </EditField>
        <EditField id='info3' bounds='bounds(0, 0, 0, 0)'  fontID='Arial' fontSize='10.0' color='black' 
            properties='(systemFont, autosize)'>
            <InitialText>3. Press button</InitialText>
        </EditField>
    </Definitions>
        <Timeline>
        <Frame >
            <!-- Place the test button tracked at the left of the screen -->
            <Place name="testButtonDrag" depth="1" x="50" y="50"/>
            <Place name='info' depth = "100" x="20" y="200"/>
            <Place name='info2' depth = "101" x="20" y="250"/>
            <Place name='info3' depth = "102" x="20" y="300"/>
            <FrameActions><![CDATA[
    stop();
    ]]></FrameActions>
        </Frame>
        <Frame>
            <Remove name="testButtonDrag" depth="1"/>
            <!-- Place the test button not-tracked at the right of the screen -->
            <Place name="testButtonNotDrag" depth="2" x="450" y="50"/>
        </Frame>
    </Timeline>
</Movie>