tone2_ce.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. <html>
  2. <head>
  3. <meta name="MSSmartTagsPreventParsing" content="TRUE">
  4. <title>Concentration -- Match the Tones 2</title>
  5. <style type="text/css">
  6. a {
  7. text-decoration:none;
  8. color:white;
  9. }
  10. a:visited {
  11. text-decoration:none;
  12. color:white;
  13. }
  14. body {
  15. margin: 0 0 0 0;
  16. }
  17. #audioPlayer {
  18. margin: 0;
  19. padding: 0;
  20. }
  21. a.external:link {
  22. text-decoration: underline;
  23. color: blue;
  24. }
  25. .error {
  26. /* color: #660000;*/
  27. font-weight: bold;
  28. text-align: left;
  29. padding: 0 100px 0 100px;
  30. }
  31. </style>
  32. <script language="javascript">
  33. function playSound(soundName) {
  34. var audioPlayer = document.getElementById('audioPlayer');
  35. audioPlayer.playSound(soundName);
  36. }
  37. var p = new Array();
  38. var po = new Array();
  39. var picData = new Array(0,1,10000,2,20000,3,30000,4,40000,5,50000,6,60000,7,70000,8,80000,9,90000,10,100000,11,110000,12,120000);
  40. var picInfo = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
  41. function preload(imgName, imgSrc) {
  42. if (document.images) {
  43. eval(imgName + ' = new Image()')
  44. eval(imgName+'.src = "'+imgSrc+'"')
  45. }
  46. }
  47. preload ('p1', '1030_fang4c.gif');
  48. preload ('p2', '1239_jiao3c.gif');
  49. preload ('p3', '13223jiao2c.gif');
  50. preload ('p4', '14164_jiao1c.gif');
  51. preload ('p5', '159jiao4c.gif');
  52. preload ('p6', '1941_da1c.gif');
  53. preload ('p7', '2662_da3c.gif');
  54. preload ('p8', '342_da4c.gif');
  55. preload ('p9', '4887_fang1c.gif');
  56. preload ('p10', '76_da2c.gif');
  57. preload ('p11', '8466_fang2c.gif');
  58. preload ('p12', '9309_fang3c.gif');
  59. preload ('p10000', '1030_fang4e.gif');
  60. preload ('p20000', '1239_jiao3e.gif');
  61. preload ('p30000', '13223jiao2e.gif');
  62. preload ('p40000', '14164_jiao1e.gif');
  63. preload ('p50000', '159jiao4e.gif');
  64. preload ('p60000', '1941_da1e.gif');
  65. preload ('p70000', '2662_da3e.gif');
  66. preload ('p80000', '342_da4e.gif');
  67. preload ('p90000', '4887_fang1e.gif');
  68. preload ('p100000', '76_da2e.gif');
  69. preload ('p110000', '8466_fang2e.gif');
  70. preload ('p120000', '9309_fang3e.gif');
  71. preload ('blankdot', 'blankdot.gif');
  72. var y;
  73. var temp;
  74. for (x=1; x<=24; x++){
  75. y = Math.round(Math.random()*(24-1))+1;
  76. temp = picData[x];
  77. picData[x] = picData[y];
  78. picData[y] = temp;
  79. }
  80. var temp1=0;
  81. var index1=0;
  82. var counter=0
  83. var condition =0;
  84. var s1;
  85. var s2;
  86. var rem;
  87. var ready = true;
  88. var soundindex = "sound12";
  89. var game_start = false;
  90. function checkit(x){
  91. if (game_start == false){
  92. tellTime();
  93. game_start = true;
  94. }
  95. if (picData[x] >= 100)
  96. playSound("sound" + picData[x] / 100);
  97. else
  98. playSound("sound" + picData[x]);
  99. if (picInfo[x]== 0 && ready==true){
  100. if (temp1==0){
  101. temp1 = picData[x];
  102. eval("document.pic" + x + ".src = p" + temp1 + ".src;");
  103. index1 = x;
  104. }
  105. else{
  106. if (index1 != x){
  107. if (picData[x] == temp1 * 10000 || picData[x] == temp1/10000){
  108. eval("document.pic" + x + ".src = p" + picData[x] + ".src;");
  109. eval("document.pic" + index1 + ".src = p" + temp1 + ".src;");
  110. temp1 = 0;
  111. picInfo[index1] = 1;
  112. picInfo[x] = 1;
  113. counter++;
  114. }
  115. else{
  116. temp1 = 0;
  117. rem = x;
  118. condition = 0;
  119. delay();
  120. }
  121. }
  122. }
  123. if (counter == 12){
  124. if (h==0 && m<10)
  125. alert("Great! Hint: Make your own game -- click on the English to see if you can match the characters!\n" +hinfo + minfo + sinfo);
  126. else
  127. alert("Good! Hint: Clicking will still play the sounds -- You can review by clicking on the English to see if you can match the characters!\n" +hinfo + minfo + sinfo);
  128. ready = false;
  129. timeCondition = false;
  130. }
  131. }
  132. }
  133. function delay(){
  134. if (condition == 0){
  135. eval("document.pic" + rem + ".src = p" + picData[rem] + ".src;");
  136. condition = 1;
  137. ready = false;
  138. setTimeout("delay()", 300);
  139. }
  140. else{
  141. eval("document.pic" + rem + ".src = blankdot.src;");
  142. eval("document.pic" + index1 + ".src=blankdot.src;");
  143. ready = true;
  144. }
  145. }
  146. </script>
  147. </head>
  148. <body marginwidth="0" marginheight="0" onResize="window.location.href = window.location.href;">
  149. <table CELLPADDING="0" CELLSPACING="0" BORDER="0" border="0" bgcolor="#330099" height="8">
  150. <tr>
  151. <td NOWRAP="1" VALIGN=CENTER bgcolor="#330099">&nbsp;&nbsp;<font face="Verdana,Arial,Helvetica" size="1"><a href="../../welcome.html">Home </a></font>&nbsp;&nbsp;<font size+1><font color="#FFFFFF">|</font></font></td>
  152. <td NOWRAP="1" bgcolor="#330099">&nbsp;&nbsp;<font face="Verdana,Arial,Helvetica" size="1"><a href="../../../China/china.html">China Index</a></font>&nbsp;&nbsp;<font size+1><font color="#FFFFFF">|</font></font></td>
  153. <td NOWRAP="1" bgcolor="#330099">&nbsp;&nbsp;<font face="Verdana,Arial,Helvetica" size="1"><a href="../../topics/topics.html">Topics </a></font>&nbsp;&nbsp;<font size+1><font color="#FFFFFF">|</font></font></td>
  154. <td NOWRAP="1" bgcolor="#330099">&nbsp;&nbsp;<font face="Verdana,Arial,Helvetica" size="1"><a
  155. href="../games.html">Games</a></font>&nbsp;&nbsp;<font size+1><font color="#FFFFFF">|</font></font></td>
  156. <td NOWRAP="1" bgcolor="#330099">&nbsp;&nbsp;<font face="Verdana,Arial,Helvetica" size="1" color="#CCCC00">Tone Match </font>&nbsp;&nbsp;<font size+1></font></td>
  157. </tr>
  158. </table>
  159. <center>
  160. <p><b><font face="Verdana"><font color="#000099"><font size=-2>Patience please. Wait until the web page finishes loading before you click on the game.<br>
  161. You can continue to play off-line as long as your web browser is open.<br>
  162. Hit "Reload" on your browser to play again.</font></font></font></b></p>
  163. <p><b><i><font face="Times New Roman,Times"><font color="#006600"><font size=+1>Enjoy!!!</font></font></font></i></b></p>
  164. <applet code="MultiAudioPlay.class" id="audioPlayer" height="1" width="1">
  165. <param name="image" value="appletsuccessicon.png">
  166. <param name="audio" value="sound1: tone2sound/1030am.wav,
  167. sound2: tone2sound/1239ch.wav,
  168. sound3: tone2sound/13223am.wav,
  169. sound4: tone2sound/14164am.wav,
  170. sound5: tone2sound/159jz.wav,
  171. sound6: tone2sound/1941jz.wav,
  172. sound7: tone2sound/2662hua.wav,
  173. sound8: tone2sound/342am.wav,
  174. sound9: tone2sound/4887hjl.wav,
  175. sound10: tone2sound/76hjl.wav,
  176. sound11: tone2sound/8466ch.wav,
  177. sound12: tone2sound/9309hua.wav,
  178. sound100: tone2sound/1030fq.wav,
  179. sound200: tone2sound/1239cl.wav,
  180. sound300: tone2sound/13223am.wav,
  181. sound400: tone2sound/14164jz.wav,
  182. sound500: tone2sound/159lz.wav,
  183. sound600: tone2sound/1941ljz.wav,
  184. sound700: tone2sound/2662jz.wav,
  185. sound800: tone2sound/342ch.wav,
  186. sound900: tone2sound/4887gmj.wav,
  187. sound1000: tone2sound/76jz.wav,
  188. sound1100: tone2sound/8466hjl.wav,
  189. sound1200: tone2sound/9309jz.wav">
  190. <p class="error">ERROR: Applet not displayed. JavaScript and Java 1.4.2 or later are required for this game to work. Visit the <a href="http://www.java.com/" title="Java Software Website" class="external">Java Software Website</a> to check if Java is installed on your computer or try enabling <em>ActiveX</em> if you are an Internet Explorer user.</p>
  191. </applet>
  192. <table border=1 BGCOLOR="#CC6699" >
  193. <tr>
  194. <td><a href="javascript:checkit(1)"><img src="blankdot.gif" border=0 name="pic1" width=64 height=64></a></td>
  195. <td><a href="javascript:checkit(2)"><img src="blankdot.gif" border=0 name="pic2" width=64 height=64></a></td>
  196. <td><a href="javascript:checkit(3)"><img src="blankdot.gif" border=0 name="pic3" width=64 height=64></a></td>
  197. <td><a href="javascript:checkit(4)"><img src="blankdot.gif" border=0 name="pic4" width=64 height=64></a></td>
  198. <td><a href="javascript:checkit(5)"><img src="blankdot.gif" border=0 name="pic5" width=64 height=64></a></td>
  199. </tr>
  200. <tr>
  201. <td><a href="javascript:checkit(6)"><img src="blankdot.gif" border=0 name="pic6" width=64 height=64></a></td>
  202. <td><a href="javascript:checkit(7)"><img src="blankdot.gif" border=0 name="pic7" width=64 height=64></a></td>
  203. <td><a href="javascript:checkit(8)"><img src="blankdot.gif" border=0 name="pic8" width=64 height=64></a></td>
  204. <td><a href="javascript:checkit(9)"><img src="blankdot.gif" border=0 name="pic9" width=64 height=64></a></td>
  205. <td><a href="javascript:checkit(10)"><img src="blankdot.gif" border=0 name="pic10" width=64 height=64></a></td>
  206. </tr>
  207. <tr>
  208. <td><a href="javascript:checkit(11)"><img src="blankdot.gif" border=0 name="pic11" width=64 height=64></a></td>
  209. <td><a href="javascript:checkit(12)"><img src="blankdot.gif" border=0 name="pic12" width=64 height=64></a></td>
  210. <td><img src="leaves.jpg" border=0 width=64 height=64></td>
  211. <td><a href="javascript:checkit(13)"><img src="blankdot.gif" border=0 name="pic13" width=64 height=64></a></td>
  212. <td><a href="javascript:checkit(14)"><img src="blankdot.gif" border=0 name="pic14" width=64 height=64></a></td>
  213. </tr>
  214. <tr>
  215. <td><a href="javascript:checkit(15)"><img src="blankdot.gif" border=0 name="pic15" width=64 height=64></a></td>
  216. <td><a href="javascript:checkit(16)"><img src="blankdot.gif" border=0 name="pic16" width=64 height=64></a></td>
  217. <td><a href="javascript:checkit(17)"><img src="blankdot.gif" border=0 name="pic17" width=64 height=64></a></td>
  218. <td><a href="javascript:checkit(18)"><img src="blankdot.gif" border=0 name="pic18" width=64 height=64></a></td>
  219. <td><a href="javascript:checkit(19)"><img src="blankdot.gif" border=0 name="pic19" width=64 height=64></a></td>
  220. </tr>
  221. <tr>
  222. <td><a href="javascript:checkit(20)"><img src="blankdot.gif" border=0 name="pic20" width=64 height=64></a></td>
  223. <td><a href="javascript:checkit(21)"><img src="blankdot.gif" border=0 name="pic21" width=64 height=64></a></td>
  224. <td><a href="javascript:checkit(22)"><img src="blankdot.gif" border=0 name="pic22" width=64 height=64></a></td>
  225. <td><a href="javascript:checkit(23)"><img src="blankdot.gif" border=0 name="pic23" width=64 height=64></a></td>
  226. <td><a href="javascript:checkit(24)"><img src="blankdot.gif" border=0 name="pic24" width=64 height=64></a></td>
  227. </tr>
  228. </table>
  229. </center>
  230. <script language="javascript">
  231. <!--
  232. var h=0;
  233. var hinfo = "";
  234. var m=0;
  235. var minfo = "";
  236. var s=-1;
  237. var sinfo = "";
  238. var timeCondition = true;
  239. function tellTime(){
  240. s++;
  241. if (s>=60){
  242. s = 0;
  243. m++;
  244. }
  245. else{
  246. if (s<=1)
  247. eval("sinfo = '" + s + " second'");
  248. else
  249. eval("sinfo = '" + s + " seconds'");
  250. }
  251. if (m>=60){
  252. m = 0;
  253. h++;
  254. }
  255. else{
  256. if (m<=1)
  257. eval("minfo = '" + m + " minute '");
  258. else
  259. eval("minfo = '" + m + " minutes '");
  260. }
  261. if (h<=1)
  262. eval("hinfo = '" + h + " hour '");
  263. else
  264. eval("hinfo = '" + h + " hours '");
  265. window.status = hinfo + minfo + sinfo;
  266. if (timeCondition == true)
  267. setTimeout("tellTime()", 1000);
  268. }
  269. //-->
  270. </script>
  271. </body>
  272. </html>