rwlbuis | 0c6da94 | 2007-05-23 10:48:16 +0000 | [diff] [blame] | 1 | <?xml version="1.0"?> |
| 2 | <svg xmlns="http://www.w3.org/2000/svg" |
| 3 | xmlns:xlink="http://www.w3.org/1999/xlink" onload="init()"> |
| 4 | <script><![CDATA[ |
| 5 | var flag=1; |
| 6 | var c; |
| 7 | |
| 8 | function init() { |
| 9 | c= document.getElementById("use") |
| 10 | setInterval("loop()",500); |
| 11 | } |
| 12 | |
| 13 | function loop() { |
| 14 | c.setAttributeNS("http://www.w3.org/1999/xlink","href","#rec"+flag) |
| 15 | flag= (flag+1) % 3; |
| 16 | } |
| 17 | ]]> |
| 18 | </script> |
| 19 | |
| 20 | |
| 21 | <symbol shape-rendering="optimizeSpeed" id="rec0" viewBox="0 0 64 64"> |
| 22 | <rect width="59" height="59" x="5" y="5" fill="blue" /> |
| 23 | <text x="17" y="56" font-size="60" click="none" > A </text> |
| 24 | </symbol> |
| 25 | |
| 26 | |
| 27 | <symbol shape-rendering="optimizeSpeed" id="rec1" viewBox="0 0 64 64"> |
| 28 | <rect width="59" height="59" x="5" y="5" fill="magenta" /> |
| 29 | <text x="17" y="56" font-size="60" click="none" > B </text> |
| 30 | </symbol> |
| 31 | |
| 32 | <use id="use" xlink:href="#rec0"/> |
| 33 | |
| 34 | </svg> |