comparison www/m/js/nodescore-slides.js @ 65:ab53902406d4

update presussex
author tzara <rc-web@kiben.net>
date Fri, 07 Jun 2013 16:17:36 +0000
parents e868cdd4b3e9
children
comparison
equal deleted inserted replaced
64:20758a107447 65:ab53902406d4
65 //console.log(text) 65 //console.log(text)
66 $("#totalcountdown").text(text); 66 $("#totalcountdown").text(text);
67 }} 67 }}
68 68
69 /////////////////////////////////////// 69 ///////////////////////////////////////
70 function pageFlip(unit) { $('#sections').trigger('goto', [parseFloat(unit)]); } 70 //function pageFlip(unit) { $('#sections').trigger('goto', [parseFloat(unit)]); }
71 71
72 ///////////////////////////////////////////////// 72 /////////////////////////////////////////////////
73 // call the fancy jquery functions 73 // call the fancy jquery functions
74 //function slideTo (target) { $('#sections').trigger('goto', [target]); } 74 function slideTo (target) { $('#sections').trigger('goto', [target]); }
75 function pad2(number) { return (number < 10 ? '0' : '') + number } 75 function pad2(number) { return (number < 10 ? '0' : '') + number }
76 76
77 ///////////////////////////////////////////////// 77 /////////////////////////////////////////////////
78 //var testSound = new buzz.sound( 'audio/testfile', { formats: [ 'ogg', 'mp3' ] } ); 78 //var testSound = new buzz.sound( 'audio/testfile', { formats: [ 'ogg', 'mp3' ] } );
79 socket.on("pageFlipfromserver", pageTurn); 79 socket.on("pageFlipfromserver", pageTurn);
80 function pageTurn (group,unit,time,mm) { 80 function pageTurn (group,unit,time,mm,seqcounter,nextunit) {
81 var groupPage=document.getElementById('group').value; 81 var groupPage=document.getElementById('group').value;
82 if (group == groupPage) { 82 if (group == groupPage) {
83 console.log(unit + " ---> " + nextunit)
83 var g= pad2(group); 84 var g= pad2(group);
84 var p= pad2(unit); 85 var p= pad2(unit);
85 // pageFlip(unit); 86 var units=8;
86 pageTurnB(unit) 87 var next=(((unit+1)%units)+units)%units
88 //$("#live").load("music.html #"+unit +" *");
89 $("#live").load("music.html #"+unit);
87 90
88 } 91 //$("#live").html("<img src='thumbs/"+ (unit) + ".png" + "' width='715'>")
92 $("#preview").html("<h3 style='background:transparent; position: relative; font-size:1.5em;top:14px; left:10px;';> n e x t : </h3><img src='thumbs/"+ (nextunit) + ".png" + "' width='305'>")
93 }
89 else { 94 else {
90 //console.log("not for this group... ignoring... for group:" + group ); 95 //console.log("not for this group... ignoring... for group:" + group );
91 } 96 }
92 }
93
94 function pageTurnB(unit) {
95 var units=6;
96 var next=(((unit+1)%units)+units)%units
97 $("#live").load("music.html #"+unit +" *");
98 $("#preview").html("<h3 style='background:transparent; position: relative; font-size:1.5em;top:14px; left:10px;';> n e x t : </h3><img src='thumbs/"+next + ".png" + "' width='315'>")
99 } 97 }
100 98
101 //////////////////////////////////////////////// 99 ////////////////////////////////////////////////
102 100
103 /* commented out for now as interferes with chat 101 /* commented out for now as interferes with chat