HTML and CSS Reference
In-Depth Information
window.setTimeout(getDirection, 30000);
var x = 176, y = 176, w = 600, h = 600, r = 26;
var d,c,s;
var rColor,gColor,bColor;
var hd = "r";
var horizontal = true;
window.onload = function () {
try{
c = document.getElementById("c");
w = c.width;
h = c.height;
s = parseInt( document.getElementById("speedy").value);
getDirection();
drawBall();
document.onkeydown = function () {
switch (window.event.keyCode) {
case 40:
horizontal = false;
hd = "d";
break;
case 37:
horizontal = true;
hd = "l";
break;
case 38:
horizontal = false;
hd = "u";
break;
case 39:
horizontal = true;
hd = "r";
break;
}
}
} catch (e) {
alert(e.message);
}
}
function increaseSpeed() {
s++;
document.getElementById("speedy").value = s;
}
function decreaseSpeed() {
s--;
document.getElementById("speedy").value = s;
}
function changeDirection() {
var cx = window.event.offsetX;
var cy = window.event.offsetY;
x = cx;
y = cy;
Search WWH ::




Custom Search