summaryrefslogtreecommitdiffstats
path: root/tests/animate.smil
blob: df4a330dae4b3dea609defb142d586804ffef6e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!-- test for moving a region with the animate element -->
<smil>
  <head>
    <layout>
      <root-layout width="400" height="300" background-color="green"/>
      <region id="region1" left="5%" top="10%" right="5%" bottom="10%"/>
      <region id="region2" left="5%" top="10%" width="20%" height="20%"
              background-color="yellow" showBackground="whenActive"/>
      <region id="regimg1"/>
    </layout>
    <transition id="fade1" dur="1" type="fade"/>
  </head>
  <body>
    <par>
      <img dur="40" id="img" src="../icons/hi48-app-kmplayer.png" 
           region="regimg1" left="25" top="10" rn:mediaOpacity="40%"
           transIn="fade1" transOut="fade1"/>
      <animateMotion target="img" dur="20" calcMode="spline" repeat="1"
                     values="25,10;300,45;25,85;300,125;25,165;300,205;25,80;25,10"
                     keyTimes="0;.1;.2;.4;.6;.8;.9;1"
                     keySplines=".5 0 .5 1;0 .75 .25 1;0 .75 .25 1;.5 0 .5 1;.5 0 .5 1;0 .75 .25 1;.5 0 .5 1"/>
      <par begin="2">
        <img dur="40" id="img2" src="../icons/hi48-app-kmplayer.png" 
             region="regimg1" left="25" top="10" rn:mediaOpacity="40%"
             transIn="fade1" transOut="fade1"/>
        <animateMotion target="img2" dur="20" calcMode="spline" repeat="1"
                       values="25,10;300,45;25,85;300,125;25,165;300,205;25,80;25,10"
                       keyTimes="0;.1;.2;.4;.6;.8;.9;1"
                       keySplines=".5 0 .5 1;0 .75 .25 1;0 .75 .25 1;.5 0 .5 1;.5 0 .5 1;0 .75 .25 1;.5 0 .5 1"/>
      </par>
      <par begin="4">
        <img dur="40" id="img3" src="../icons/hi48-app-kmplayer.png" 
             region="regimg1" left="25" top="10" rn:mediaOpacity="40%"
             transIn="fade1" transOut="fade1"/>
        <animateMotion target="img3" dur="20" calcMode="spline" repeat="1"
                       values="25,10;300,45;25,85;300,125;25,165;300,205;25,80;25,10"
                       keyTimes="0;.1;.2;.4;.6;.8;.9;1"
                       keySplines=".5 0 .5 1;0 .75 .25 1;0 .75 .25 1;.5 0 .5 1;.5 0 .5 1;0 .75 .25 1;.5 0 .5 1"/>
      </par>
    <seq>
    <par>
      <text id="text1" src="data:,8,8%20animateMotion%20by%2032x32%20and%20back"
            region="region1" left="8" top="8" dur="5"/>
      <animateMotion target="text1" begin="1" dur=".5" by="32,32"/>
      <animateMotion target="text1" begin="3" dur=".5" by="-32,-32"/>
    </par>
    <par>
      <text id="text2" src="data:,20%25,75%25%0AanimateMotion%0Ato%2040%25,20%25%0Aback%20to%20150,20"
            region="region1" left="20%" top="75%" dur="5"/>
      <animateMotion target="text2" begin="1" dur=".5" to="40%,20%"/>
      <animateMotion target="text2" begin="3" dur=".5" to="150,20"/>
    </par>
    <par>
      <text id="text3" src="data:,8,8%0AanimateMotion%0Afrom%2040%25,20%25%0Aby%2040%25,-20%25"
            region="region1" left="8" top="8" dur="3"/>
      <animateMotion target="text3" begin="1" dur=".5"
                     from="20%,75%" by="40%,-20%"/>
    </par>
    <par>
      <text id="text4" src="data:,8,8%0AanimateMotion%0Afrom%2010,150%0Ato%20150,10"
            region="region1" left="8" top="8" dur="3"/>
      <animateMotion target="text4" begin="1" dur=".5"
                     from="10,150" to="150,10"/>
    </par>
    <par>
      <text id="text6" src="data:,lineair%20animateMotion%0Avalues%2020,20;150,5;160,160"
            region="region1" left="8" top="8" dur="5"/>
      <animateMotion target="text6" begin="2" dur="2"
                     values="20,20;150,5;160,170"/>
    </par>
    <par>
      <text id="text7" src="data:,lineair%20animateMotion%0Avalues%2020,20;160,35;140,160%0AkeyTimes0;0.8;1"
            region="region1" left="8" top="8" dur="5"/>
      <animateMotion target="text7" begin="2" dur="2"
                     values="20,20;160,35;140,160" keyTimes="0;0.8;1"/>
    </par>
    <par>
      <text id="text8" src="data:,spline%20animateMotion%0Avalues%2020,20;160,35;140,160%0AkeyTimes0;0.5;1%0AkeySplines%20.5%200%20.5%201;0%20.75%20.25%201"
            region="region1" left="8" top="8" dur="5"/>
      <animateMotion target="text8" begin="1" dur="3" calcMode="spline"
                     values="20,20;160,35;140,160"
                     keyTimes="0;0.5;1"
                     keySplines=".5 0 .5 1;0 .75 .25 1"/>
    </par>
    <par>
      <text id="text9" src="data:,discrete%20animateMotion%0Avalues%2020,20;160,35;140,160%0AkeyTimes0;0.5;1"
            region="region1" left="8" top="8" dur="5"/>
      <animateMotion target="text9" begin="1" dur="3" calcMode="discrete"
                     values="20,20;160,35;140,160"
                     keyTimes="0;0.5;1"/>
    </par>
    <par>
      <text regPoint="center" regAlign="center" id="text5" src="data:,animateMotion%20on%20region"
            region="region2" dur="10"/>
      <animateMotion target="region2" begin="1" dur="2" calcMode="spline"
                     from="5%,10%" to="55%, 15%" keySplines=".5 0 .5 1"/>
      <animateMotion target="region2" begin="3" dur="2" calcMode="spline"
                     to="65%,60%" keySplines=".5 0 .5 1"/>
      <animateMotion target="region2" begin="5" dur="2" calcMode="spline"
                     by="-45%,10%" keySplines=".5 0 .5 1"/>
      <animateMotion target="region2" begin="7" dur="2" calcMode="spline"
                     from="20%,70%" by="-15%,-60%" keySplines="1 0 0 1"/>
    </par>
    </seq>
    </par>
  </body>
</smil>