comparison www/8/js/nodescore-slides.js @ 64:20758a107447

major fix of lots of bugs
author tzara <rc-web@kiben.net>
date Thu, 23 May 2013 22:41:23 +0000
parents 9bf133b91890
children
comparison
equal deleted inserted replaced
63:9bf133b91890 64:20758a107447
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 unit = (unit+1) 83 console.log(unit + " ---> " + nextunit)
84 var g= pad2(group); 84 var g= pad2(group);
85 var p= pad2(unit); 85 var p= pad2(unit);
86 var units=8; 86 var units=8;
87 var next=(((unit+1)%units)+units)%units 87 var next=(((unit+1)%units)+units)%units
88 //$("#live").load("music.html #"+unit +" *"); 88 //$("#live").load("music.html #"+unit +" *");
89 $("#live").load("music.html #"+unit); 89 $("#live").load("music.html #"+unit);
90 90
91 //$("#live").html("<img src='thumbs/"+ (unit) + ".png" + "' width='715'>") 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/"+ (unit) + ".png" + "' width='315'>") 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 } 93 }
94 else { 94 else {
95 //console.log("not for this group... ignoring... for group:" + group ); 95 //console.log("not for this group... ignoring... for group:" + group );
96 } 96 }
97 } 97 }