<?xml version='1.0' ?>
<!-- <!DOCTYPE Movie SYSTEM "dtd/RVML.dtd"> -->
<Movie version='6' width='600' height='600' rate='1' backgroundColor='rgb(255, 255, 255)' compressed='No'
    xmlns="http://www.kineticfusion.org/RVML/2.0">
    <Title>
        Timeline Replace Examples
    </Title>
    <Desc>
        Illustrates the contexts in which the Replace timeline element may be used instead of
        using a Remove followed by Place. Replace can be used with Text symbols, Shape Symbols and 
        MorphShape symbols and will keep the timeline properties of the symbol being replaced unless 
        explicitly overridden. Hence clipping regions defined for a symbol will be maintained by
        any replacing symbol and morph shapes will inherit the same ratio attribute value.
    </Desc>
    <Repository repositoryType='File' repositoryBase='/temp' repositoryName='exampleResources'>
        <Font id='Arial' fontName='Arial' codeClass='Latin' resourceLocation='Arial.swf' fontRange='defined' />
    </Repository>
    <Definitions>
        <Text id='text1' bounds='bounds(0.0, 1.0, 329.5, 45.0)'>
            <Segment text='This is some text' fontID='Arial' fontSize='30.0' y='21.0' color='black' advances='auto' />
        </Text>
        <Shape id='Rectangle' bounds='auto'>
            <LineStyles>
                <LineStyle index='1' width='3' color='purple'/>
            </LineStyles>
            <FillStyles>
                <ColorFill index="1" color="yellow"/>
            </FillStyles>
            <Edges>
                <SetStyle line= '1' mainFill="1" />
                <Rect x='0' y='100' width='200' height='100' rx='2' ry='4' />
            </Edges>
        </Shape>
        <Shape id='Rectangle2' bounds='auto'>
            <LineStyles>
                <LineStyle index='1' width='3' color='blue'/>
            </LineStyles>
            <FillStyles>
                <ColorFill index="1" color="red"/>
            </FillStyles>
            <Edges>
                <SetStyle line= '1' mainFill="1" />
                <Rect x='0' y='100' width='200' height='100' rx='2' ry='4' />
            </Edges>
        </Shape>
     <MorphShape id='morph1'>
            <CommonFillStyles>
                <FillStylePair>
                    <ColorFill index='1' color="black"/>
                    <ColorFill index='1' color="white"/>
                </FillStylePair>
            </CommonFillStyles>
            <FromShape bounds='auto'>
                <Edges>
                    <SetStyle mainFill='1' />
                    <Rect x="0" y="0" width="200" height="100"/>
                </Edges>
            </FromShape>
            <ToShape bounds='auto'>
                <Edges>
                    <Rect x="0" y="0" width="200" height="100"/>
                </Edges>
            </ToShape>
        </MorphShape>
        <MorphShape id='morph2'>
            <CommonFillStyles>
                <FillStylePair>
                    <ColorFill index='1' color="black"/>
                    <ColorFill index='1' color="white"/>
                </FillStylePair>
            </CommonFillStyles>
            <FromShape bounds='auto'>
                <Edges>
                    <SetStyle mainFill='1' />
                    <Rect x="0" y="0" width="200" height="200"/>
                </Edges>
            </FromShape>
            <ToShape bounds='auto'>
                <Edges>
                    <Rect x="0" y="0" width="200" height="200"/>
                </Edges>
            </ToShape>
        </MorphShape>
                    
    </Definitions>
    <Timeline>
        <Frame>
            <Place name='text1' depth='4'  y="100"/>
            <Place name='Rectangle' depth='5' clipDepth ="6" x="150" y="100"/>
            <Place name='Rectangle' depth='6' x="250" y="100"/>
            <Place name='morph1' depth='7' ratio="32000" x="250" y="300"/>
        </Frame>
        <Frame>
            <!-- A Shape can replace a Text Symbol -->
            <Replace name='Rectangle' depth='4' />
            <!-- This will continue to clip depth 6 -->
            <Replace name='Rectangle2' depth='5' />
            <Replace name='Rectangle2' depth='6' />
            <!-- This will keep the same ratio so will still be grey -->
            <Replace name='morph2' depth='7'/>
        </Frame>
    </Timeline>
</Movie>