From f5fae4bbf7d84419cf4ecb38238bfb9bb2f911e5 Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Sat, 10 Sep 2011 01:44:35 -0700 Subject: Tutorial started --- js/mapspecs.js | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'js/mapspecs.js') diff --git a/js/mapspecs.js b/js/mapspecs.js index fe58658..17e4a74 100644 --- a/js/mapspecs.js +++ b/js/mapspecs.js @@ -8,6 +8,9 @@ window.onload = function(){ //document.getElementById('blocksdisplay').innerHTML = ""+blocks+""; //doSend(); loadSol(); + if (ischallenge == true) { + challengehint(); + } } var solution = new Array(); @@ -274,6 +277,9 @@ function animatePathDone(mapid) { updateDsp(mapid, 'dspScore', htmlscores); htmlscores = ''; } + if (ischallenge == true) { + challengecomplete(mapid); + } } function request_scores_done() { @@ -624,12 +630,16 @@ function doanimate(x, y, p, c, mapid) { setTimeout("doanimate("+x+","+y+",'"+p+"','"+t+"','"+mapid+"')",rs); } -function flashelement(eid, times, color) { +function flashelement(eid, times, color, speed) { //alert("exe"+eid); if (document.getElementById(eid) == undefined) return; if (!color) { color = "#FFFF44"; } + if (!speed) { + speed = 220; + } + speedon = speed * .5; //document.getElementById(eid).setAttribute('class', 'no_transition'); var currentclass = document.getElementById(eid).className; if (document.getElementById(eid).classOrigName != undefined) @@ -639,17 +649,17 @@ function flashelement(eid, times, color) { document.getElementById(eid).style.backgroundColor = '#000000'; for (var i=0; i