|
|
|
@ -9,8 +9,8 @@
|
|
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<button id="final_test" onclick="location.href='final.html';">go to final test </button>
|
|
|
|
|
<!--baloons -->
|
|
|
|
|
<div class="baloons_all">
|
|
|
|
|
<div class="comment1stpage baloons"id="baloon1" style="display: none;">
|
|
|
|
|
<p class="text_baloon1">
|
|
|
|
|
It looks like the previous owner of the newspaper highlighted something
|
|
|
|
@ -34,10 +34,12 @@
|
|
|
|
|
you still have to purchase the tickets!
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="newspaper_wrap">
|
|
|
|
|
<button class="close" style="display: none;"><span class="button_text">close</span></button>
|
|
|
|
|
<!--newspaper pages -->
|
|
|
|
|
|
|
|
|
|
<button id="close_news"style="display: none;"><span class="button_text">close</span></button>
|
|
|
|
|
<div id="newspaper" style="display: none;">
|
|
|
|
|
<div class="left_page">
|
|
|
|
|
|
|
|
|
@ -95,13 +97,13 @@
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="groundline"></div>
|
|
|
|
|
<div id="player_img"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div id="ground">
|
|
|
|
|
<div id="player_img"></div>
|
|
|
|
|
<img id="bench" src="imgs/park/bench1.gif" height="20%">
|
|
|
|
|
<img id="tree1" src="imgs/park/tree1.gif" height="30%">
|
|
|
|
|
<img id="tree2" src="imgs/park/tree4.gif" height="25%">
|
|
|
|
@ -114,9 +116,18 @@
|
|
|
|
|
<img id="flower5" src="imgs/park/flower1.gif" height="5%">
|
|
|
|
|
<img id="grass1" src="imgs/park/grass1.gif" height="75vw">
|
|
|
|
|
<img id="grass2" src="imgs/park/grass1.gif" height="75vw">
|
|
|
|
|
<img id="statue" src="imgs/park/statue.gif" height="20%">
|
|
|
|
|
<img id="tree4" src="imgs/park/tree4.gif" height="25%">
|
|
|
|
|
<img id="flower6" src="imgs/park/flower1.1.gif" height="5%">
|
|
|
|
|
<img id="dog" src="imgs/park/dog1.gif" height="10%">
|
|
|
|
|
<img id="kiosk" src="imgs/park/stand3.gif" height="20%">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="text_container">
|
|
|
|
|
<div class="message1">
|
|
|
|
@ -138,19 +149,41 @@
|
|
|
|
|
|
|
|
|
|
<script src="jquery.min.js"></script>
|
|
|
|
|
<script>
|
|
|
|
|
// player moves
|
|
|
|
|
|
|
|
|
|
//move
|
|
|
|
|
var $div = $('#player_img');
|
|
|
|
|
var screenLeftMin = 200;
|
|
|
|
|
var screenLeftMax = 870;
|
|
|
|
|
|
|
|
|
|
function adjustScroll() {
|
|
|
|
|
var playerLeft = parseInt($div.css("left"));
|
|
|
|
|
var scrollLeft = $(document).scrollLeft();
|
|
|
|
|
var screenLeft = playerLeft - scrollLeft;
|
|
|
|
|
console.log ("screenleft:", screenLeft);
|
|
|
|
|
|
|
|
|
|
if (screenLeft > screenLeftMax ) {
|
|
|
|
|
$(document).scrollLeft(playerLeft - screenLeftMax)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (screenLeft < screenLeftMin ) {
|
|
|
|
|
$(document).scrollLeft(playerLeft - screenLeftMin)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$(document).keydown(function(e) {
|
|
|
|
|
switch (e.which) {
|
|
|
|
|
case 37:
|
|
|
|
|
$div.css('left', $div.offset().left - 20);
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
adjustScroll();
|
|
|
|
|
break;
|
|
|
|
|
case 38:
|
|
|
|
|
$div.css('top', $div.offset().top - 20);
|
|
|
|
|
break;
|
|
|
|
|
case 39:
|
|
|
|
|
$div.css('left', $div.offset().left + 20);
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
adjustScroll();
|
|
|
|
|
break;
|
|
|
|
|
case 40:
|
|
|
|
|
$div.css('top', $div.offset().top + 20);
|
|
|
|
@ -175,7 +208,7 @@ $(document).keydown(function(e) {
|
|
|
|
|
// open newspaper
|
|
|
|
|
|
|
|
|
|
$(".open_newspaper_index").click (function(){
|
|
|
|
|
$("#newspaper, #close_news").toggle();
|
|
|
|
|
$("#newspaper, .close").toggle();
|
|
|
|
|
//saves that u opened the newspaper in the local storage
|
|
|
|
|
window.localStorage.setItem("newspaper","opened")
|
|
|
|
|
console.log ("newspaper:",localStorage.newspaper)
|
|
|
|
@ -189,7 +222,7 @@ $(document).keydown(function(e) {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("#arrow_back1").click (function(){
|
|
|
|
|
$("#baloon1, #baloon2, #baloon3, #baloon4, .school2,.school3").hide();
|
|
|
|
|
$("#baloon1, #baloon2, #baloon3, #baloon4, .school2,.school3, .message2").hide();
|
|
|
|
|
$(".index, .school1, .message4").show();
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
@ -225,9 +258,9 @@ $(document).keydown(function(e) {
|
|
|
|
|
$(".message4").show();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("#close_news").click (function(){
|
|
|
|
|
$(".close").click (function(){
|
|
|
|
|
$("#newspaper").hide();
|
|
|
|
|
$("#close_news").hide();
|
|
|
|
|
$(".close").hide();
|
|
|
|
|
$("#baloon1").hide();
|
|
|
|
|
$("#baloon2").hide();
|
|
|
|
|
$("#baloon3").hide();
|
|
|
|
|