06_Menu/Menu_01b_L.htm
1 <html xmlns:t ="urn:schemas-microsoft-com:time">
2 <head>
3 <title>Menu_01</title>
4 <?import namespace="t" implementation="#default#time2">
5 <style>
6 .Menu {position:absolute; left:10px; top:90px;
7 height:20; width:150; display:none;
8 border-width:1px; border-style:solid;
9 text-align:center;
10 }
11 </style>
12 <script type="text/javascript" src="ufo.js"></script>
13 <script type="text/javascript" >
14 var x=10;
15 var y=90;
16 var nb=4; // ak nb=0 - vtedy budu prve 4 body podla obr. v clanku
17
18 function PosunMenu()
19 {
20 bStop=false;
21 Draha = new CDraha();
22 M1.style.display='block';
23
24 var xc, yc;
25 xc = event.clientX; yc=event.clientY;
26 // štyri body .. pre vytvorenie obrázku v článku
27 if (nb==0) { xc=170; yc=170; }
28 if (nb==1) { xc=300; yc=100; }
29 if (nb==2) { xc=580; yc=260; }
30 if (nb==3) { xc=290; yc=160; }
31 nb++;
32
33 A1.path=Cesta(x,y, xc, yc);
34 A1.beginElement();
35 x=xc;
36 y=yc;
37 }
38
39 function Cesta(xz, yz, xc, yc)
40 {
41 var c;
42 c = " M " + xz + " " + yz;
43 c += " L " + xc + " " + yc ;
44 return c;
45 }
46
47 function SkryMenu()
48 {
49 M1.style.display='none';
50 }
51
52 function Nad (M) { M.style.backgroundColor='#ffcc00'; }
53 function Mimo(M) { M.style.backgroundColor='#ffffff'; }
54
55 function OF1 ()
56 {
57 alert("Kuko");
58 }
59
60 </script>
61 </head>
62 <body oncontextmenu="PosunMenu(); return false;";
63 onclick = "SkryMenu();"
64 id='B' onload="document.all.B.onmousemove=Pozicia"
65 >
66 <h2>Obsluha udalostí</h2>
67 <span class="Menu" id="M1" onclick="OF1()";
68 onmouseover="Nad(this)" onmouseout="Mimo(this)" > Kuko </span>
69
70 <t:animateMotion id="A1" targetElement="M1" origin="parent"
71 begin="indefinite" dur="2" fill="freeze"
72 onend="bStop=true; Draha.Zobraz(I);"
73 />
74 <span id="I" style="behavior: url(#default#time2)"
75 dur=".01" repeatCount="indefinite" fill="hold"
76 onrepeat = "Draha.PridajBod(A1, M1, bStop);" >
77 </span>
78 </body>
79 </html>