﻿function moveableObject(x, y, id, mouseoversound) { this.xpos = x; this.ypos = y; this.xinc = 0.0; this.yinc = 0.0; this.targetx = 0.0; this.targety = 0.0; this.movetimer; this.swaptimer; this.pausetimer; this.soundtimer; this.finishedmove = 0; this.divid = id; this.mouseoversound = mouseoversound; }
function shift(object, obj, xinc, yinc, targetX, targetY, nextmove) { object.xpos = object.xpos + xinc; object.ypos = object.ypos + yinc; obj.style.left = Math.round(object.xpos) + "px"; obj.style.top = Math.round(object.ypos) + "px"; if (Math.abs(targetX - object.xpos) < 10) { if (Math.abs(targetY - object.ypos) < 10) { clearTimeout(object.movetimer); clearTimeout(object.swaptimer); if (nextmove != null) { nextmove(); } else { var test = 5; } } } }
function moveObj(object, targetX, targetY, msPeriod, img1src, img2src, imgchangeperiod, nextmove) {
    var obj = document.getElementById(object.divid); object.xpos = parseInt(obj.style.left.replace("px", "")); object.ypos = parseInt(obj.style.top.replace("px", "")); var xincrement = (20 * (targetX - object.xpos) / msPeriod); var yincrement = (20 * (targetY - object.ypos) / msPeriod); var test = true; var slide = function() { shift(object, obj, xincrement, yincrement, targetX, targetY, nextmove); }; if (img2src != null) { var swap = function() { swapImage(object.divid, img1src, img2src); }; object.swaptimer = window.setInterval(swap, imgchangeperiod); }
    object.movetimer = window.setInterval(slide, 20);
}
function changeImg(object, src, period, nextmove) { changeImage(object.divid, src); if (nextmove != null) { object.pausetimer = window.setTimeout(nextmove, pause); } }
function changeImage(id, src) {
    var obj = document.getElementById(id); var nodeList = obj.childNodes; for (var i = 0; i < nodeList.length; i++) { if (obj.childNodes[i].id == 'Img') { obj.removeChild(obj.childNodes[i]); } }
    var img = document.createElement('img'); img.setAttribute('src', src); img.setAttribute('id', 'Img'); obj.appendChild(img);
}
function swapImage(id, src1, src2) { var div = document.getElementById(id); var nodeList = div.childNodes; for (var i = 0; i < nodeList.length; i++) { if (div.childNodes[i].id == 'Img') { var oldimg = div.childNodes[i]; if (oldimg.src.indexOf(src1) >= 0) { changeImage(id, src2); } else { changeImage(id, src1); } } } }
function pause(object, period, nextmove) { if (nextmove != null) { object.pausetimer = window.setTimeout(nextmove, period); } }
function hideshow(object, pause, nextmove) {
    var obj = document.getElementById(object.divid); if (obj.style.visibility == "hidden") { obj.style.visibility = "visible"; } else { obj.style.visibility = "hidden"; }
    if (nextmove != null) { object.pausetimer = window.setTimeout(nextmove, pause); } 
}
function changeZIndex(object, pause, nextmove, zInd) { var obj = document.getElementById(object.divid); obj.style.zIndex = zInd; object.pausetimer = window.setTimeout(nextmove, pause); }
function playsound(object, soundid, filename, volume, period, nextmove) {
    try {
        if (soundid == null) { soundManager.play(object.divid, filename); } else {
            if (volume != null) { soundManager.setVolume(soundid, volume); }
            soundManager.play(soundid);
        } 
    } catch (err) { }
    if (nextmove != null) { object.soundtimer = window.setTimeout(nextmove, period); } 
}
function stopsound(object, soundid, period, nextmove) { soundManager.stop(soundid); if (nextmove != null) { object.soundtimer = window.setTimeout(nextmove, period); } }
function renderObject(object, src, zInd, guitarsrc, guitarZInd, guitarRelX, guitarRelY, nextmove) {
    var newdiv = document.createElement('div'); newdiv.setAttribute('id', object.divid); var img = document.createElement('img'); img.setAttribute('src', src); img.setAttribute('id', 'Img'); img.style.position = "absolute"; img.style.top = "0px"; img.style.left = "0px"; img.style.zIndex = zInd; newdiv.style.left = Math.round(object.xpos) + "px"; newdiv.style.top = Math.round(object.ypos) + "px"; if (guitarsrc != null) {
        var gimg = document.createElement('img'); gimg.setAttribute('src', guitarsrc); gimg.setAttribute('id', 'GImg'); if (guitarRelX == null) { gimg.style.position = "absolute"; gimg.style.top = "88px"; gimg.style.left = "10px"; } else { gimg.style.position = "absolute"; gimg.style.top = guitarRelY + "px"; gimg.style.left = guitarRelX + "px"; }
        gimg.style.zIndex = guitarZInd; newdiv.appendChild(gimg);
    }
    newdiv.appendChild(img); if (object.mouseoversound != null) { newdiv.setAttribute('onMouseOver', "soundManager.play('" + object.mouseoversound + "');"); newdiv.setAttribute('onMouseOut', "soundManager.stop('" + object.mouseoversound + "');"); }
    newdiv.style.zIndex = zInd; newdiv.style.position = 'absolute'; var stage = document.getElementById('stage'); stage.appendChild(newdiv); if (nextmove != null) { object.movetimer = window.setTimeout(nextmove, 10); } 
}
function deleteObject(object, nextmove) {
    var obj = document.getElementById(object.divid); while (obj.childNodes[0]) { obj.removeChild(obj.childNodes[0]); }
    var stage = document.getElementById('stage'); stage.removeChild(obj); if (nextmove != null) { object.pausetimer = window.setTimeout(nextmove, 10); } 
}
function deleteGuitar(object, nextmove) { var obj = document.getElementById(object.divid); var gobj = obj.getElementsByTagName("img"); obj.removeChild(gobj[0]); if (nextmove != null) { object.pausetimer = window.setTimeout(nextmove, 10); } }
function checkImageLoad(nextFunction) { if (imageCount == loadedImageCount) { window.setTimeout(nextFunction, 10); clearTimeout(imagetimer); } }
function checkSoundLoad(nextFunction) { if (soundCount == loadedSoundCount) { window.setTimeout(nextFunction, 10); clearTimeout(soundtimer); } }
function imageLoaded() { ++loadedImageCount; }
function preloadImage(src) { preload_image_object = new Image(); preload_image_object.src = src; ++imageCount; preload_image_object.onload = imageLoaded; }
function soundLoaded() { ++loadedSoundCount; }
function preloadSound(soundid, soundurl) { var thesound = soundManager.createSound({ id: soundid, url: soundurl, autoLoad: true, autoPlay: false }); ++soundCount; thesound.onload = function() { alert('test') }; }
function multimoveObj(object, Legs, msPeriod, img1src, img2src, imgchangeperiod, nextmove) { var numLegs = Legs.length; var moveArray = new Array(numLegs); moveArray[numLegs - 1] = function() { moveObj(object, Legs[numLegs - 1].targetX, Legs[numLegs - 1].targetY, Legs[numLegs - 1].msPeriod, img1src, img2src, imgchangeperiod, nextmove); }; for (var i = (numLegs - 2); i > 0; i--) { moveArray[i] = function() { moveObj(object, Legs[i].targetX, Legs[i].targetY, Legs[i].msPeriod, img1src, img2src, imgchangeperiod, moveArray[i + 1]); }; } }
function moveLeg(targetX, targetY, msPeriod) { var obj = new Object(); obj.targetX = targetX; obj.targetY = targetY; obj.msPeriod = msPeriod; return obj; }
function createLegArray() { var legArray = new Array(4); legArray[0] = moveLeg(100.0, 200.0, 500); legArray[1] = moveLeg(300.0, 200.0, 1000); legArray[2] = moveLeg(100.0, 200.0, 2000); legArray[3] = moveLeg(400.0, 400.0, 1000); }
function parabolaMove(object, targetX, targetY, startX, startY, msPeriod, widthX, heightY, img1src, img2src, imgchangeperiod, nextmove) {
    var obj = document.getElementById(object.divid); object.xpos = parseInt(obj.style.left.replace("px", "")); object.ypos = parseInt(obj.style.top.replace("px", "")); var xincrement = (20 * (targetX - object.xpos) / msPeriod); var test = true; var slide = function() { parabolaShift(object, obj, xincrement, targetX, startX, startY, targetY, widthX, heightY, nextmove); }; if (img2src != null) { var swap = function() { swapImage(object.divid, img1src, img2src); }; object.swaptimer = window.setInterval(swap, imgchangeperiod); }
    object.movetimer = window.setInterval(slide, 20);
}
function parabolaShift(object, obj, xinc, targetX, startX, startY, targetY, widthX, heightY, nextmove) {
    object.xpos = object.xpos + xinc; var coeffdenom = 0.5 * widthX; var coeff = heightY / (coeffdenom * coeffdenom); var calc1; if (xinc < 0) { calc1 = object.xpos - startX + widthX / 2; } else { calc1 = object.xpos - startX - widthX / 2; }
    var calc2 = calc1 * calc1 * coeff; var calc3 = calc2 - heightY; object.ypos = calc3 + startY; obj.style.left = Math.round(object.xpos) + "px"; obj.style.top = Math.round(object.ypos) + "px"; if (Math.abs(targetX - object.xpos) < 10) { if (Math.abs(targetY - object.ypos) < 10) { clearTimeout(object.movetimer); clearTimeout(object.swaptimer); if (nextmove != null) { nextmove(); } else { var test = 5; } } } 
}
AJSetup = function() { var AJObj = new moveableObject(1000.0, 260.0, 'AJ', 'ajSound'); var FantomObj = new moveableObject(220.0, 440.0, 'Fantom', 'ajSound'); var move9 = function() { PickRandom(); }; var move8 = function() { moveObj(AJObj, 220.0, 350.0, 1000.0, 'Images/aj_l_1.gif', null, 400.0, move9); }; var move7 = function() { renderObject(FantomObj, 'Images/fantom.gif', '90', null, null, null, null, move8) }; var move6 = function() { deleteGuitar(AJObj, move7); }; var move2 = function() { moveObj(AJObj, 220, 260.0, 2000.0, 'Images/aj_l_1.gif', null, 400.0, move6); }; var move1 = function() { renderObject(AJObj, 'Images/aj_l_1.gif', '85', 'Images/fantom.gif', '90', 0, 170, move2); }; var imageCnt = 0; var loadedCnt = 0; var starttmr; preloadImage("/Images/fantom.gif"); var move0 = function() { starttmr = window.setInterval(move1, 500); }; pause(AJObj, 17000, move1); }
CliffSetup = function() { var CliffObj = new moveableObject(500.0, 350.0, 'Cliff', 'chSound'); var MesaObj = new moveableObject(480.0, 320.0, 'CliffAmp', 'chgSound'); var ChargerObj = new moveableObject(-630.0, 380.0, 'Charger', null); renderObject(ChargerObj, 'Images/charger.gif', '98', null, null); var move7 = function() { deleteObject(ChargerObj, null); }; var move6 = function() { moveObj(ChargerObj, 900.0, 380.0, 2000.0, 'Images/charger.gif', null, null, move7); moveObj(CliffObj, 500.0, 350.0, 1000.0, 'Images/cliff_r_1.gif', 'Images/cliff_r_2.gif', 400.0, null); }; var move5 = function() { moveObj(CliffObj, 280.0, 350.0, 900.0, 'Images/cliff_l_1.gif', 'Images/cliff_l_2.gif', 400.0, null); moveObj(MesaObj, 280.0, 320.0, 1000.0, 'Images/CliffAmp.gif', null, 100.0, move6); }; var move4 = function() { renderObject(CliffObj, 'Images/cliff_l_1.gif', '90', 'Images/telecaster.gif', '91', null, null, move5) }; var move3 = function() { renderObject(MesaObj, 'Images/CliffAmp.gif', '10', null, null, null, null, move4) }; var move2 = function() { pause(CliffObj, 2000, move3) }; var move1 = function() { moveObj(ChargerObj, 300.0, 380.0, 2000.0, 'Images/charger.gif', null, null, move2); }; var move0c = function() { playsound(CliffObj, null, 'Sounds/1969_chargerB.mp3', 100, 10, move1); }; var imageCnt = 0; var loadedCnt = 0; var starttmr; preloadImage("Images/charger.gif"); var move0b = function() { checkImageLoad(loadedCnt, imageCnt, starttmr, move0c); }; var move0 = function() { starttmr = window.setInterval(move0c, 500); }; pause(CliffObj, 1000, move0c); }
AndreSetup = function() { var AndreObj = new moveableObject(830.0, 350.0, 'Andre', 'abSound'); var ExplosionObj1 = new moveableObject(830.0, 320.0); var ExplosionObj2 = new moveableObject(880.0, 360.0); var ExplosionObj3 = new moveableObject(780.0, 280.0); var ExplosionObj4 = new moveableObject(880.0, 280.0); var ExplosionObj5 = new moveableObject(780.0, 360.0); var BombObj = new moveableObject(850.0, -200.0); renderObject(BombObj, 'Images/bomb.gif', '90'); var EnglObj = new moveableObject(800.0, 290.0, 'Engl', 'abSound'); var move14 = function() { GuitarSwap(); }; var move13 = function() { deleteObject(ExplosionObj5, null); }; var move12 = function() { deleteObject(ExplosionObj4, move13); }; var move11 = function() { deleteObject(ExplosionObj3, move12); }; var move10 = function() { deleteObject(ExplosionObj2, move11); }; var move9 = function() { deleteObject(ExplosionObj1, move10); }; var move8 = function() { pause(ExplosionObj1, 1200, move9); }; var move7 = function() { renderObject(EnglObj, 'Images/engl.gif', '10', null, null, null, null, move8) }; var move6 = function() { renderObject(AndreObj, 'Images/andre_l_1.gif', '90', 'Images/LesPaul.gif', '91', null, null, move7) }; var move5 = function() { renderObject(ExplosionObj5, 'Images/explosion1.gif', '100', null, null, null, null, move6) }; var move4 = function() { renderObject(ExplosionObj4, 'Images/explosion1.gif', '100', null, null, null, null, move5) }; var move3 = function() { renderObject(ExplosionObj3, 'Images/explosion1.gif', '100', null, null, null, null, move4) }; var move2 = function() { renderObject(ExplosionObj2, 'Images/explosion1.gif', '100', null, null, null, null, move3) }; var move1 = function() { renderObject(ExplosionObj1, 'Images/explosion1.gif', '100', null, null, null, null, move2) }; var move08 = function() { playsound(ExplosionObj1, 'bombSound', null, 100, 10, move1); }; var move05 = function() { deleteObject(BombObj, move08); }; var move03 = function() { moveObj(BombObj, 830.0, 380.0, 1000.0, 'Images/bomb.gif', null, 400.0, move05); }; var imageCnt = 0; var loadedCnt = 0; var starttmr; preloadImage("Images/explosion1.gif"); preloadImage("Images/engl.gif"); preloadImage("Images/bomb.gif"); preloadImage("Images/LesPaul.gif"); var move0b = function() { checkImageLoad(loadedCnt, imageCnt, starttmr, move03); }; var move0 = function() { starttmr = window.setInterval(move03, 500); }; pause(AndreObj, 11000, move03); }
MicaelaSetup = function() {
    var MicaelaObj = new moveableObject(90.0, -200.0, 'Micaela', 'mbSound'); renderObject(MicaelaObj, 'Images/micaela_l_1.gif', '90', 'Images/Laney_RB4.gif', '10', 10, 40); var BassAmpObj = new moveableObject(100.0, 380.0, 'BassAmp', 'mbSound'); var divelement = document.getElementById('Micaela'); divelement.style.position = 'absolute'; divelement.style.width = '140px'; var move11 = function() { moveObj(MicaelaObj, 90.0, 350.0, 2000.0, 'Images/micaela_r_1.gif', 'Images/micaela_r_2.gif', 400.0, null); }; var move10 = function() { renderObject(MicaelaObj, 'Images/micaela_r_1.gif', '90', 'Images/bass.gif', '91', null, null, move11); }; var move9 = function() { deleteObject(MicaelaObj, move10); }; var move8 = function() { moveObj(MicaelaObj, -310.0, 350.0, 1500.0, 'Images/micaela_l_1.gif', 'Images/micaela_l_2.gif', 400.0, move9); }; var move7 = function() { renderObject(BassAmpObj, 'Images/Laney_RB4.gif', '10', null, null, null, null, move8) }; var move6 = function() { deleteGuitar(MicaelaObj, move7); }; var move2 = function() { moveObj(MicaelaObj, 90.0, 350.0, 2000.0, 'Images/micaela_r_1.gif', null, 400.0, move6); }; var move1 = function() { pause(MicaelaObj, 6000, move2); }; var ParachuteObj = new moveableObject(-40.0, -370.0, 'Parachute', null); renderObject(ParachuteObj, 'Images/parachute.gif', '5'); var pmove4 = function() { deleteObject(ParachuteObj); }; var pmove3 = function() { moveObj(ParachuteObj, -440.0, 180.0, 1500.0, null, null, null, pmove4); }; var pmove2 = function() { moveObj(ParachuteObj, -40.0, 180.0, 2000.0, null, null, null, pmove3); }; var pmove1 = function() { pause(ParachuteObj, 6000, pmove2); }; var start = function() { pmove1(); move1(); }
    var imageCnt = 0; var loadedCnt = 0; var starttmr; preloadImage("Images/parachute.gif"); preloadImage("Images/Laney_RB4.gif"); preloadImage("Images/bass.gif", imageCnt, loadedCnt); var move0b = function() { checkImageLoad(loadedCnt, imageCnt, starttmr, start); }; var move0 = function() { starttmr = window.setInterval(move0b, 500); }; pause(MicaelaObj, 6000, start);
}
BrentSetup = function() { var BrentObj = new moveableObject(-300, 320.0, 'Brent', 'bmSound'); renderObject(BrentObj, 'Images/brent_r_1.gif', '8', 'Images/bubinga.gif', '9', -100, -50); var DrumObj = new moveableObject(420.0, 320.0, 'Drum', 'bmSound'); var divelement = document.getElementById('Brent'); divelement.style.position = 'absolute'; divelement.style.width = '140px'; var move8 = function() { moveObj(BrentObj, 580.0, 250.0, 600.0, 'Images/brent_r_1.gif', null, 400.0, null); }; var move7 = function() { renderObject(DrumObj, 'Images/bubinga.gif', '40', null, null, null, null, move8) }; var move6 = function() { deleteGuitar(BrentObj, move7); }; var move5 = function() { moveObj(BrentObj, 580.0, 320.0, 2000.0, 'Images/brent_r_1.gif', 'Images/brent_r_2.gif', 400.0, move6); }; var move1 = function() { pause(BrentObj, 2000, move5); }; var imageCnt = 0; var loadedCnt = 0; var starttmr; preloadImage("Images/bubinga.gif"); var move0b = function() { checkImageLoad(loadedCnt, imageCnt, starttmr, move1); }; var move0 = function() { starttmr = window.setInterval(move0b, 500); }; pause(BrentObj, 7000, move1); }
CreateProps = function() { var BandLogoObj = new moveableObject(220.0, 50.0, 'BandLogo', null); renderObject(BandLogoObj, 'Images/BandLogo.jpg', '4'); var MicStandCliffObj = new moveableObject(500.0, 410.0, 'MicStandCliff', null); renderObject(MicStandCliffObj, 'Images/MicStand.gif', '99'); var MicStandAJObj = new moveableObject(220.0, 410.0, 'MicStandAJ', null); renderObject(MicStandAJObj, 'Images/MicStand.gif', '99'); }
UfoWig = function() {
    var reamimageCount = 0; var reamloadedCount = 0; if (document.images) { preloadImage("/Images/ufo2.gif", reamimageCount, reamloadedCount); preloadImage("/Images/wig.gif", reamimageCount, reamloadedCount); }
    var UfoObj = new moveableObject(-100.0, 100.0, 'Ufo', 'ajSound'); renderObject(UfoObj, 'Images/ufo2.gif', '30'); var divelement = document.getElementById('Ufo'); divelement.style.visibility = 'hidden'; divelement.style.position = 'absolute'; divelement.style.width = '140px'; var WigObj = new moveableObject(595.0, 160.0, 'Wig', 'ajSound'); renderObject(WigObj, 'Images/wig.gif', '80'); var divwig = document.getElementById('Wig'); divwig.style.visibility = 'hidden'; var ExplosionObj = new moveableObject(560.0, 200.0); var move14 = function() { deleteObject(ExplosionObj, PickRandom); }; var move12 = function() { deleteObject(WigObj, move14); }; var move11 = function() { pause(ExplosionObj, 1200, move12); }; var move10a = function() { playsound(ExplosionObj, 'bombSound', null, 40, 10, move11); }; var move10 = function() { renderObject(ExplosionObj, 'Images/explosion1.gif', '100', null, null, null, null, move10a) }; var move9 = function() { pause(WigObj, 3000, move10); }; var move8 = function() { deleteObject(UfoObj, move9); }; var move7 = function() { moveObj(UfoObj, 1000.0, 100.0, 2000.0, 'Images/ufo2.gif', null, 400.0, move8); }; var move6a = function() { playsound(UfoObj, 'ufoSound', null, 50, 10, move7); }; var move6 = function() { moveObj(WigObj, 595.0, 260.0, 4000.0, 'Images/wig.gif', null, 400.0, move6a); }; var move5 = function() { hideshow(WigObj, 50.0, move6); }; var move3 = function() { pause(UfoObj, 1000, move5); }; var move2 = function() { moveObj(UfoObj, 565.0, 100.0, 4000.0, 'Images/ufo2.gif', null, 0, move3); }; var move1a = function() { playsound(UfoObj, 'ufoSound', null, 50, 10, move2); }; var move1 = function() { hideshow(UfoObj, 10, move1a); }; pause(UfoObj, 1000, move1); var reamtimer; var start = function() { checkImageLoad(reamloadedCount, reamimageCount, reamtimer, move0); };
}
AmpJump = function() { var AndreObj = new moveableObject(830.0, 350.0, 'Andre', 'abSound'); var MicaelaObj = new moveableObject(90.0, 350.0, 'Micaela', 'mbSound'); var move10 = function() { moveObj(MicaelaObj, 90.0, 350.0, 2000.0, 'Images/micaela_r_1.gif', 'Images/micaela_r_1.gif', 400.0, PickRandom); }; var move9 = function() { changeImg(MicaelaObj, 'Images/micaela_r_1.gif', 100, move10); }; var move8 = function() { parabolaMove(MicaelaObj, 80, 350, 90, 250, 1000, -50, 80, 'Images/micaela_r_2.gif', null, null, move9); }; var move7 = function() { changeImg(MicaelaObj, 'Images/micaela_l_2.gif', 100, move8); }; var move6 = function() { changeImg(AndreObj, 'Images/andre_l_1.gif', 100, move7); }; var move5 = function() { parabolaMove(AndreObj, 830, 350, 830, 350, 1000, -50, 250, 'Images/andre_l_2.gif', null, null, move6); }; var move4 = function() { changeImg(AndreObj, 'Images/andre_l_2.gif', 100, move5); }; var move3 = function() { changeImg(MicaelaObj, 'Images/micaela_r_1.gif', 100, move4); }; var move2 = function() { parabolaMove(MicaelaObj, 130, 230, 90, 250, 1000, 50, 80, 'Images/micaela_r_2.gif', null, null, move3); }; var move1a = function() { changeImg(MicaelaObj, 'Images/micaela_r_2.gif', 100, move2); }; var move1 = function() { changeImg(AndreObj, 'Images/andre_l_1.gif', 100, move1a); }; var move0 = function() { parabolaMove(AndreObj, 860, 140, 830, 350, 1000, 50, 250, 'Images/andre_l_2.gif', null, null, move1); }; changeImg(AndreObj, 'Images/andre_l_2.gif', 100, move0); }
SignFix = function() { var BandLogoObj = new moveableObject(220.0, 50.0, 'BandLogo', null); var CliffObj = new moveableObject(500.0, 350.0, 'Cliff', 'chSound'); var LadderObj = new moveableObject(350.0, 230.0, 'Ladder', null); var move18 = function() { moveObj(CliffObj, 500.0, 350.0, 600.0, 'Images/cliff_r_1.gif', 'Images/cliff_r_2.gif', 400.0, PickRandom); }; var move17 = function() { renderObject(CliffObj, 'Images/cliff_r_1.gif', '90', 'Images/Telecaster.gif', '91', null, null, move18); }; var move16 = function() { deleteObject(CliffObj, move17); }; var move15 = function() { deleteObject(LadderObj, move16); }; var move14 = function() { moveObj(CliffObj, 400.0, 350.0, 1000.0, 'Images/cliff_r_1.gif', 'Images/cliff_r_2.gif', 100.0, move15); }; var move11 = function() { moveObj(CliffObj, 360.0, 170.0, 1000.0, 'Images/cliff_l_1.gif', 'Images/cliff_l_2.gif', 100.0, null); moveObj(BandLogoObj, 220.0, 50.0, 1000.0, 'Images/BandLogo.jpg', null, 100.0, move14); }; var move6 = function() { renderObject(LadderObj, 'Images/Ladder3.gif', '10', null, null, null, null, move11) }; var move5 = function() { deleteGuitar(CliffObj, move6); }; var move4 = function() { moveObj(CliffObj, 400.0, 350.0, 1000.0, 'Images/cliff_l_1.gif', 'Images/cliff_l_2.gif', 100.0, move5); }; var move3 = function() { renderObject(CliffObj, 'Images/cliff_l_1.gif', '90', 'Images/Ladder3.gif', '91', -50, -100, move4); }; var move2 = function() { deleteObject(CliffObj, move3); }; var move1 = function() { moveObj(CliffObj, 950.0, 350.0, 1000.0, 'Images/cliff_r_1.gif', 'Images/cliff_r_2.gif', 100.0, move2); }; moveObj(BandLogoObj, 220, 350, 500, 'Images/BandLogo.jpg', null, null, move1); }
AJKeytar = function() { var AJObj = new moveableObject(220.0, 350.0, 'AJ', null); var move9 = function() { renderObject(AJObj, 'Images/aj_r_1.gif', '85', null, null, null, null, PickRandom); }; var move8 = function() { deleteObject(AJObj, move9); }; var move7 = function() { moveObj(AJObj, 220.0, 350.0, 500.0, 'Images/aj_r_1.gif', 'Images/aj_r_2.gif', 100.0, move8); }; var move6 = function() { moveObj(AJObj, 120.0, 350.0, 1300.0, 'Images/aj_r_1.gif', 'Images/aj_r_2.gif', 100.0, move7); }; var move5d = function() { parabolaMove(AJObj, 700, 350, 600, 350, 500, 100, 80, 'Images/aj_r_2.gif', null, null, move6); }; var move5c = function() { parabolaMove(AJObj, 600, 350, 500, 350, 500, 100, 80, 'Images/aj_r_2.gif', null, null, move5d); }; var move5b = function() { parabolaMove(AJObj, 500, 350, 400, 350, 500, 100, 80, 'Images/aj_r_2.gif', null, null, move5c); }; var move5a = function() { parabolaMove(AJObj, 400, 350, 300, 350, 500, 100, 80, 'Images/aj_r_2.gif', null, null, move5b); }; var move4 = function() { moveObj(AJObj, 300.0, 350.0, 300.0, 'Images/aj_r_1.gif', 'Images/aj_r_2.gif', 100.0, move5a); }; var move3 = function() { playsound(AJObj, 'ajcheese', null, 50, 10, move4); }; var move2 = function() { renderObject(AJObj, 'Images/aj_r_1.gif', '90', 'Images/KeyTar_small.gif', '91', null, null, move3); }; deleteObject(AJObj, move2); }
GuitarSwap = function() { var MicaelaObj = new moveableObject(90.0, 350.0, 'Micaela', 'mbSound'); var CliffObj = new moveableObject(500.0, 350.0, 'Cliff', 'chSound'); var AndreObj = new moveableObject(830.0, 350.0, 'Andre', 'abSound'); var MicaelaGuitar = new moveableObject(100.0, 438.0, 'Bass', 'mbSound'); var CliffGuitar = new moveableObject(510.0, 438.0, 'Tele', 'chSound'); var AndreGuitar = new moveableObject(840.0, 438.0, 'LesPaul', 'abSound'); var move20 = function() { renderObject(CliffObj, 'Images/cliff_r_1.gif', '90', 'Images/Telecaster.gif', '91', null, null, PickRandom); }; var move19 = function() { deleteObject(CliffObj, move20); }; var move18 = function() { deleteObject(CliffGuitar, move19); }; var move17 = function() { renderObject(AndreObj, 'Images/andre_r_1.gif', '90', 'Images/LesPaul.gif', '91', null, null, move18); }; var move16 = function() { deleteObject(AndreObj, move17); }; var move15 = function() { deleteObject(AndreGuitar, move16); }; var move14 = function() { renderObject(MicaelaObj, 'Images/micaela_r_1.gif', '90', 'Images/bass.gif', '91', null, null, move15); }; var move13 = function() { deleteObject(MicaelaObj, move14); }; var move12 = function() { deleteObject(MicaelaGuitar, move13); }; var move11 = function() { parabolaMove(CliffGuitar, 510, 438, 510, 438, 500, -330, 350, 'Images/LesPaul.gif', null, null, null); parabolaMove(MicaelaGuitar, 100, 438, 100, 438, 600, -410, 150, 'Images/Telecaster.gif', null, null, null); parabolaMove(AndreGuitar, 840, 438, 100, 438, 1000, 740, 250, 'Images/Telecaster.gif', null, null, move12); }; var move10 = function() { pause(AndreGuitar, 2000, move11); }; var move9 = function() { parabolaMove(MicaelaGuitar, 510, 438, 510, 438, 500, -330, 350, 'Images/LesPaul.gif', null, null, null); parabolaMove(AndreGuitar, 100, 438, 100, 438, 600, -410, 150, 'Images/Telecaster.gif', null, null, null); parabolaMove(CliffGuitar, 840, 438, 100, 438, 1000, 740, 250, 'Images/Telecaster.gif', null, null, move10); }; var move8 = function() { pause(AndreGuitar, 2000, move9); }; var move7 = function() { parabolaMove(AndreGuitar, 510, 438, 510, 438, 500, -330, 350, 'Images/LesPaul.gif', null, null, null); parabolaMove(CliffGuitar, 100, 438, 100, 438, 600, -410, 150, 'Images/Telecaster.gif', null, null, null); parabolaMove(MicaelaGuitar, 840, 438, 100, 438, 1000, 740, 250, 'Images/Telecaster.gif', null, null, move8); }; var move6 = function() { renderObject(MicaelaGuitar, 'Images/Bass.gif', '90', null, null, null, null, move7); }; var move5 = function() { deleteGuitar(MicaelaObj, move6); }; var move4 = function() { renderObject(CliffGuitar, 'Images/Telecaster.gif', '90', null, null, null, null, move5); }; var move3 = function() { deleteGuitar(CliffObj, move4); }; var move2 = function() { renderObject(AndreGuitar, 'Images/LesPaul.gif', '90', null, null, null, null, move3); }; deleteGuitar(AndreObj, move2); }
PacMan = function() { var PacManObj = new moveableObject(-50, 400.0, 'PacMan', null); var move2 = function() { deleteObject(PacManObj, PickRandom); }; var move1 = function() { moveObj(PacManObj, 1100.0, 400.0, 1800.0, 'Images/pacman_trans3.gif', null, 100.0, move2); }; renderObject(PacManObj, 'Images/PacMan_Trans3.gif', '70', null, null, null, null, move1); }
HomerCrawl = function() { var HomerObj = new moveableObject(-50, 440.0, 'Homer', null); var move2 = function() { deleteObject(HomerObj, PickRandom); }; var move1 = function() { moveObj(HomerObj, 1100.0, 440.0, 3800.0, 'Images/homer2.gif', null, 100.0, move2); }; renderObject(HomerObj, 'Images/Homer2.gif', '93', null, null, null, null, move1); }
LoadReams = function() { CreateProps(); BrentSetup(); MicaelaSetup(); AndreSetup(); preloadImage("Images/Ladder3.gif"); AJSetup(); CliffSetup(); }
PickRandom = function() { var rnd = 50 * Math.random(); if (rnd <= 10) UfoWig(); else if (rnd <= 20) GuitarSwap(); else if (rnd <= 30) AmpJump(); else if (rnd <= 40) SignFix(); else if (rnd <= 50) AJKeytar(); }
