// =============================== //
// Bouncing Images //
// v1.1 - Feb 5, 2005 //
// ------------------------------- //
// Written by Lloyd Hassell //
// Website: lloydhassell.com //
// Email: lloydhassell@hotmail.com //
// =============================== //
// Featured on: Dynamic Drive HTML code library (http://www.dynamicdrive.com)
// INITIALIZATION:
bouncingImages = new Object();
var c = document.getElementById("container");
var sound = document.createElement('audio');
sound.className = 'bounce';
sound.autoplay = 'true';
sound.src = 'https://cdn.discordapp.com/attachments/306555345365368842/987698914545242193/mixkit-basketball-falling-indoor-394_mp3cut.net.wav';
// CONFIGURATION:
bouncingImages.imgCount = 13;
bouncingImages.imgWidth = 275;
bouncingImages.imgHeight = 275;
bouncingImages.imgSrc = '/images/Gerard_s eyes/1.PNG';
bouncingImages.frameRate = 30;
bouncingImages.minRandomSpeed = 2;
bouncingImages.maxRandomSpeed = 13;
// MAIN:
bouncingImages.isLoaded = false;
bouncingImages.dirX = new Array();
bouncingImages.dirY = new Array();
bouncingImages.posX = new Array();
bouncingImages.posY = new Array();
bouncingImages.speedX = new Array();
bouncingImages.speedY = new Array();
var winWidth, winHeight;
if (dyn) var preloadImgObj = loadImg(bouncingImages.imgSrc);
function loadBouncingImages() {
if (dyn && !bouncingImages.isLoaded) {
winWidth = getWinWidth() - 17;
winHeight = getWinHeight() - 17;
for (var layerLoop = 0; layerLoop < bouncingImages.imgCount; layerLoop++) {
bouncingImages.dirX[layerLoop] = (Math.round(Math.random()) == 0) ? 'left' : 'right';
bouncingImages.dirY[layerLoop] = (Math.round(Math.random()) == 0) ? 'up' : 'down';
bouncingImages.posX[layerLoop] = Math.floor(Math.random() * (winWidth - bouncingImages.imgWidth - 1)) + getDocScrollLeft();
bouncingImages.posY[layerLoop] = Math.floor(Math.random() * (winHeight - bouncingImages.imgHeight - 1)) + getDocScrollTop();
bouncingImages.speedX[layerLoop] = Math.round(Math.random() * (bouncingImages.maxRandomSpeed - bouncingImages.minRandomSpeed)) + bouncingImages.minRandomSpeed;
bouncingImages.speedY[layerLoop] = Math.round(Math.random() * (bouncingImages.maxRandomSpeed - bouncingImages.minRandomSpeed)) + bouncingImages.minRandomSpeed;
var tempLayerObj = addLayer('bouncingImagesLyr' + layerLoop);
bouncingImages['layerObj' + layerLoop] = tempLayerObj;
setLayerSize(tempLayerObj,bouncingImages.imgWidth,bouncingImages.imgHeight);
setLayerClip(tempLayerObj,0,bouncingImages.imgWidth,bouncingImages.imgHeight,0);
setLayerHTML(tempLayerObj,getImgTag('bouncingImagesImg' + layerLoop,preloadImgObj.src,bouncingImages.imgWidth,bouncingImages.imgHeight,0));
moveLayerTo(tempLayerObj,bouncingImages.posX[layerLoop],bouncingImages.posY[layerLoop]);
showLayer(tempLayerObj);
}
bouncingImages.isLoaded = true;
moveBouncingImages();
}
}
function moveBouncingImages() {
for (var layerLoop = 0; layerLoop < bouncingImages.imgCount; layerLoop++) {
if (bouncingImages.dirX[layerLoop] == 'left') {
if (bouncingImages.posX[layerLoop] > bouncingImages.speedX[layerLoop]) {
bouncingImages.posX[layerLoop] -= bouncingImages.speedX[layerLoop];
} else {
bouncingImages.dirX[layerLoop] = 'right';
bouncingImages.posX[layerLoop] = 0;
}
}
else if (bouncingImages.dirX[layerLoop] == 'right') {
if (bouncingImages.posX[layerLoop] + bouncingImages.imgWidth < winWidth - bouncingImages.speedX[layerLoop]) {
bouncingImages.posX[layerLoop] += bouncingImages.speedX[layerLoop];
} else {
bouncingImages.dirX[layerLoop] = 'left';
bouncingImages.posX[layerLoop] = winWidth - bouncingImages.imgWidth;
}
}
if (bouncingImages.dirY[layerLoop] == 'up') {
if (bouncingImages.posY[layerLoop] > bouncingImages.speedY[layerLoop]) {
bouncingImages.posY[layerLoop] -= bouncingImages.speedY[layerLoop];
} else {
bouncingImages.dirY[layerLoop] = 'down';
bouncingImages.posY[layerLoop] = 0;
}
}
else if (bouncingImages.dirY[layerLoop] == 'down') {
if (bouncingImages.posY[layerLoop] + bouncingImages.imgHeight < winHeight - bouncingImages.speedY[layerLoop]) {
bouncingImages.posY[layerLoop] += bouncingImages.speedY[layerLoop];
} else {
bouncingImages.dirY[layerLoop] = 'up';
bouncingImages.posY[layerLoop] = winHeight - bouncingImages.imgHeight;
}
}
}
for (var layerLoop = 0; layerLoop < bouncingImages.imgCount; layerLoop++) moveLayerTo(bouncingImages['layerObj' + layerLoop],bouncingImages.posX[layerLoop] + getDocScrollLeft(),bouncingImages.posY[layerLoop] + getDocScrollTop());
window.setTimeout('moveBouncingImages()',bouncingImages.frameRate);
}
My Daily Favorites
Sunday |
Monday |
Tuesday |
Wednesday |
Thursday |
Friday |
Saturday |
fent |
lasgna I stole from Garfield |
tacos |
sperm whale |
meth |
fent |
fent |
jump off a bridgefun day |
mania |
turn aroundget beheaded |
paint |
write a manifesto |
attempt a coup |
go on a hike |
Joseph Stalin |
Karl Marx |
Ted Kacynzski |
Baikal Seal |
Spongebob |
Tony |
Mr. Cottontail |
text ex |
read garfield comic strips |
flamenco dance |
Russian Orthodox Baptism at Lake Baikal |
harass squidward |
dance paty!!! |
fall down a rabbit hole |
_._ _,-'""`-._
(,-.`._,'( |\`-/|
`-.-' \ )-`( , o o)
`- \`_`"'-
What the FUCK is up y'all. Ya'll seen them WAP at Broughton Lane, Sheffield, S9 2DF, England?
Coordinates are 53°24′0″N 1°25′8″W
- meatballs
- spaghetti
- pizza
hmmmmmmmm
hmmm
i i
at 50/100
piss
hiiiii