66 return; |
66 return; |
67 } |
67 } |
68 |
68 |
69 this.canSelectWord = false; |
69 this.canSelectWord = false; |
70 |
70 |
71 // Start the mosaic effect |
|
72 incMosaic.UnpauseEffect(true); |
|
73 |
|
74 // Fade the text |
|
75 $('.big_txt').animate({opacity: 0}, 20000 * 1 / effectSpeed); |
|
76 |
|
77 // Save the word |
71 // Save the word |
78 this.setCookie("niv1_world" + this.currentWorldIndex, $("#mot" + wordIndex).html()); |
72 this.setCookie("niv1_world" + this.currentWorldIndex, $("#mot" + wordIndex).html()); |
|
73 |
|
74 ++this.currentWorldIndex; |
|
75 |
|
76 if (this.currentWorldIndex == 3) { |
|
77 // The 3 words get choosen |
|
78 location.href = "niv1_videoplayer.html"; |
|
79 } else { |
|
80 |
|
81 // Start the mosaic effect |
|
82 incMosaic.UnpauseEffect(true); |
|
83 |
|
84 // Fade the text |
|
85 $('.big_txt').animate({opacity: 0}, 20000 * 1 / effectSpeed); |
|
86 } |
79 }; |
87 }; |
80 |
88 |
81 this.effectIsDone = function() |
89 this.effectIsDone = function() |
82 { |
90 { |
83 this.canSelectWord = true; |
91 this.canSelectWord = true; |
84 ++this.currentWorldIndex; |
|
85 |
92 |
86 // Set the list of words and the mosaic effect |
93 // Set the list of words and the mosaic effect |
87 this.setWordsAndEffect(this.currentWorldIndex); |
94 this.setWordsAndEffect(this.currentWorldIndex); |
88 |
95 |
89 // Stop the mosaic effect |
96 // Stop the mosaic effect |
90 incMosaic.UnpauseEffect(false); |
97 incMosaic.UnpauseEffect(false); |
91 |
98 |
92 // Fade the text |
99 // Fade the text |
93 $('.big_txt').animate({opacity: 1}, 10000 * 1 / effectSpeed); |
100 $('.big_txt').animate({opacity: 1}, 10000 * 1 / effectSpeed); |
94 |
|
95 if (this.currentWorldIndex == 3) { |
|
96 // The 3 words get choosen |
|
97 location.href = "niv1_videoplayer.html"; |
|
98 } |
|
99 }; |
101 }; |
100 |
102 |
101 this.getChoosenWords = function() |
103 this.getChoosenWords = function() |
102 { |
104 { |
103 return [this.getCookie("niv1_world0"), this.getCookie("niv1_world1"), this.getCookie("niv1_world2")]; |
105 return [this.getCookie("niv1_world0"), this.getCookie("niv1_world1"), this.getCookie("niv1_world2")]; |