2 <meta charset="UTF-8"/>
3 <html xmlns="http://www.w3.org/1999/xhtml"
6 <title>Light control</title>
7 <link rel='stylesheet' type='text/css' href='webif.css'/>
9 <script type="text/ecmascript" src="lightcontrol.js">
14 <body onLoad="_init()">
15 <h1>Light control</h1>
18 Red <input type='text' id='red' onChange='change_light("red", this.value)'/><br/>
19 Green <input type='text' id='green' onChange='change_light("green", this.value)'/><br/>
20 Blue <input type='text' id='blue' onChange='change_light("blue", this.value)'/><br/>
21 White <input type='text' id='white' onChange='change_light("white", this.value)'/><br/>
26 <svg width="1024" height="768" version="1.1"
27 xmlns="http://www.w3.org/2000/svg"
28 xmlns:xlink="http://www.w3.org/1999/xlink" >
30 <script type="text/ecmascript"><![CDATA[
34 var timer_increment = 200;
40 function StartAnimation(evt)
42 welcome = evt.target.ownerDocument.getElementById("welcome");
43 andromeda = evt.target.ownerDocument.getElementById("andromeda");
44 slide_white = evt.target.ownerDocument.getElementById("slide_white");
48 function MoveAndromeda()
50 timevalue = timevalue + timer_increment;
51 if (timevalue > max_time)
55 andromeda.setAttribute("x", -550 + timevalue / max_time * 800);
56 setTimeout("MoveAndromeda()", timer_increment);
59 function MoveWelcome()
61 timevalue = timevalue + timer_increment;
62 if (timevalue > max_time)
64 //andromeda.setAttribute("x", 0);
67 //setTimeout("MoveAndromeda()", timer_increment);
70 welcome.setAttribute("y", timevalue / max_time * 100);
71 setTimeout("MoveWelcome()", timer_increment);
74 function ShowAndGrowElement()
76 timevalue = timevalue + timer_increment;
77 if (timevalue > max_time)
79 //welcome.setAttribute("y", 0);
81 setTimeout("MoveWelcome()", timer_increment);
85 //scalefactor = (timevalue * 20.) / max_time;
86 //text_element.setAttribute("transform", "scale(" + scalefactor + ")");
88 // Make the image more opaque
89 opacityfactor = timevalue / max_time;
90 m31.setAttribute("opacity", opacityfactor);
91 // Call ShowAndGrowElement again <timer_increment> milliseconds later.
92 setTimeout("ShowAndGrowElement()", timer_increment)
94 window.ShowAndGrowElement = ShowAndGrowElement
97 <rect x="40" y="240" width="10" height="200" fill='white'/>
98 <rect id='slide_white' x="30" y="280" width="30" height="10" stroke='white' fill='yellow' draggable='true' ondrag='alert("drag")' ondragstart='alert("dragstart")'/>
99 <text id="welcome" x="10" y="0" stroke="white" font-color="white" font-size="80">Welcome to</text>
100 <text id="andromeda" x="-550" y="550" stroke="white" font-color="white" font-size="80">Andromeda</text>
105 <svg width="200" height="40" version="1.1"
106 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
107 <a xlink:href='example11.xhtml'>
108 <rect x="35" y="15" width="60" height="10"/>
109 <polygon points="35,5 10,20 35,35" fill="yellow" stroke="black" stroke-width="3"/>
112 <a xlink:href='example11.xhtml'>
113 <rect x="110" y="15" width="60" height="10"/>
114 <polygon points="170,5 195,20 170,35" fill="yellow" stroke="black" stroke-width="3"/>