<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!-- <!DOCTYPE Movie SYSTEM "dtd/RVML.dtd"> --> <Movie version='6' width='600' height='400' rate='12' backgroundColor='white' compressed='No' xmlns="http://www.kineticfusion.org/RVML/2.0"> <Title> Button Sound Example </Title> <Desc> Illustrates how sounds can be associated with each button state and how the properties of the sounds can be manipulated with SoundInfo elements. </Desc> <Repository repositoryType='AbsoluteFile'> <Sound id='sound' format='ADPCM' resourceType='SWF' resourceLocation='/temp/exampleResources/sounds/pingADPCM.swf' /> </Repository> <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> on(release) { gotoAndStop( 2); } </ButtonActions> <ButtonSound> <ButtonPressSound soundName="sound"> <SoundInfo uniquePlay='No' stopPlaying='No' loopCount='1'> <SoundEnvelope mark="0" leftVolume="100"/> </SoundInfo> </ButtonPressSound> <ButtonReleaseSound soundName="sound"> <SoundInfo uniquePlay='No' stopPlaying='No' loopCount='1'> <SoundEnvelope mark="0" rightVolume="100"/> </SoundInfo> </ButtonReleaseSound> <ButtonRollOverSound soundName="sound"> <SoundInfo uniquePlay='No' stopPlaying='No' loopCount='1'> <SoundEnvelope mark="0" leftVolume="0" rightVolume="0"/> <SoundEnvelope mark="200" leftVolume="100" rightVolume="100"/> </SoundInfo> </ButtonRollOverSound> <ButtonRollOutSound soundName="sound"> <SoundInfo uniquePlay='No' stopPlaying='No' loopCount='1'> <SoundEnvelope mark="0" leftVolume="100" rightVolume="100"/> <SoundEnvelope mark="200" /> </SoundInfo> </ButtonRollOutSound> </ButtonSound> </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> on(release) { gotoAndStop( 1); } </ButtonActions> <ButtonSound> <ButtonPressSound soundName="sound"> <SoundInfo uniquePlay='No' stopPlaying='No' loopCount='1'> <SoundEnvelope mark="0" leftVolume="100"/> </SoundInfo> </ButtonPressSound> <ButtonReleaseSound soundName="sound"> <SoundInfo uniquePlay='No' stopPlaying='No' loopCount='1'> <SoundEnvelope mark="0" rightVolume="100"/> </SoundInfo> </ButtonReleaseSound> <ButtonRollOverSound soundName="sound"> <SoundInfo uniquePlay='No' stopPlaying='No' loopCount='1'> <SoundEnvelope mark="0" leftVolume="0" rightVolume="0"/> <SoundEnvelope mark="200" leftVolume="100" rightVolume="100"/> </SoundInfo> </ButtonRollOverSound> <ButtonRollOutSound soundName="sound"> <SoundInfo uniquePlay='No' stopPlaying='No' loopCount='1'> <SoundEnvelope mark="0" leftVolume="100" rightVolume="100"/> <SoundEnvelope mark="200" /> </SoundInfo> </ButtonRollOutSound> </ButtonSound> </Button> </Definitions> <Timeline> <Frame > <!-- Place the test button tracked at the left of the screen --> <Place name="testButtonDrag" depth="1" x="50" y="50"/> <FrameActions> 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>