Fixed clicking bug and added changes to the COMPARE page.

This commit is contained in:
Hardmath123 2013-11-04 18:52:33 -08:00
parent 26ee03976a
commit 2786143669
4 changed files with 24 additions and 26 deletions

View file

@ -7,16 +7,9 @@ header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
<head>
<title>Scratch HTML5 vs. Flash</title>
<meta charset="utf-8">
<style type="text/css">
body {
background: #222;
color: #fff;
margin: 0;
}
</style>
<link href="player.css" type="text/css" rel="stylesheet" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
<script src="js/util/Timer.js"></script>
<script src="js/util/OffsetBuffer.js"></script>
<script src="js/util/Color.js"></script>
@ -89,14 +82,23 @@ header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
</head>
<body>
<div style="display: inline-block;">
<div id="up">&nbsp;</div>
<div id="left">&nbsp;</div>
<div id="overContainer">
<div id="greenSlide"><div id="greenSlideFg"><img src="img/greenflag.png"></div></div>
<div id="container"></div>
<div id="up">&#x25B2;</div>
<div id="ui-top">
<div id="info">Loading&hellip;</div>
<button id="trigger_stop">&#9632;</button>
<button id="trigger_green_flag">&#9873;</button>
<div class="clearer"></div>
</div>
<div id="right">&nbsp;</div>
<div id="down">&nbsp;</div>
<div id="left">&#x25c0;</div>
<div id="overContainer">
<div id="greenSlide"><div id="greenSlideFg"><img src="img/greenflag.png"></div></div>
<div id="container"></div>
</div>
<div id="right">&#x25b6;</div>
<div id="ui-bottom">
<span id="address-hint">http://scratch.mit.edu/projects/</span><input type="text" name="project_id" id="project_id" placeholder="10000160" /><button id='go_project'>&rarr;</button></div>
<div id="down">&#x25BC;</div>
</div>
<div style="display: inline-block;">
<div id="flashScratch" style="text-align:center;visibility:hidden;">
@ -106,11 +108,5 @@ header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
</a>
</div>
</div>
<div id="info">Loading...</div>
<button id="trigger_green_flag">Green flag</button>
<button id="trigger_stop">Stop</button>
<input type="text" name="project_id" id="project_id" /><button id='go_project'>Go!</button>
</body>
</html>

View file

@ -27,6 +27,7 @@ var IO = function() {
// In production, simply use the local path (no proxy)
// since we won't be hampered by the same-origin policy.
this.base = 'proxy.php?resource=internalapi/';
//this.base = 'http://scratch.mit.edu/internalapi/'; // Final base
this.project_base = this.base + 'project/';
this.project_suffix = '/get/';
this.asset_base = this.base + 'asset/';

View file

@ -196,9 +196,10 @@ Sprite.prototype.updateCostume = function() {
Sprite.prototype.onClick = function(evt) {
// TODO - needs work!!
var boxOffset = $('#container').offset();
var mouseX = runtime.mousePos[0] + 240 + boxOffset.left;
var mouseY = 180 - runtime.mousePos[1] + boxOffset.top;
// We don't need boxOffset anymore.
var mouseX = runtime.mousePos[0] + 240;
var mouseY = 180 - runtime.mousePos[1];
if (this.mesh.src.indexOf('.svg') == -1) {
// HACK - if the image SRC doesn't indicate it's an SVG,

View file

@ -2,7 +2,7 @@ body {
background: #fff;
color: #333;
margin: 0;
padding: 30px;
padding: 0px;
font-family: sans-serif;
}
/* Wrapper wraps the entire player, and the text below and above. Ideally,