fruitkc.html 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  1. <html>
  2. <head>
  3. <meta name="MSSmartTagsPreventParsing" content="TRUE">
  4. <title>Concentration -- Match the Fruit</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,100,2,200,3,300,4,400,5,500,6,600,7,700,8,800,9,900,10,1000,11,1100,12,1200);
  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', 'applec.gif');
  48. preload ('p2', 'apricotc.gif');
  49. preload ('p3', 'bananac.gif');
  50. preload ('p4', 'cherryc.gif');
  51. preload ('p5', 'grapec.gif');
  52. preload ('p6', 'lemonc.gif');
  53. preload ('p7', 'limec.gif');
  54. preload ('p8', 'orange2c.gif');
  55. preload ('p9', 'peachc.gif');
  56. preload ('p10', 'pineapplec.gif');
  57. preload ('p11', 'plumc.gif');
  58. preload ('p12', 'watermelonc.gif');
  59. preload ('p100', 'applee.gif');
  60. preload ('p200', 'apricote.gif');
  61. preload ('p300', 'bananae.gif');
  62. preload ('p400', 'cherrye.gif');
  63. preload ('p500', 'grapee.gif');
  64. preload ('p600', 'lemone.gif');
  65. preload ('p700', 'limee.gif');
  66. preload ('p800', 'orange2e.gif');
  67. preload ('p900', 'peache.gif');
  68. preload ('p1000', 'pineapplee.gif');
  69. preload ('p1100', 'plume.gif');
  70. preload ('p1200', 'watermelone.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 * 100 || picData[x] == temp1/100){
  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">
  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">Fruit Loops </font>&nbsp;&nbsp;<font size+1></font></td>
  157. </tr>
  158. </table>
  159. <center><br>
  160. <b><font face="Verdana" color="#000099" 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.<br>
  163. </font></b>
  164. <p><b><i><font face="Times New Roman,Times" color="#006600" size="+1">Enjoy!!!</font></i></b></p>
  165. <applet code="MultiAudioPlay.class" id="audioPlayer" height="1" width="1">
  166. <param name="image" value="appletsuccessicon.png">
  167. <param name="audio" value="sound1: fruitsound/456lz.wav,
  168. sound2: fruitsound/14459zh.wav,
  169. sound3: fruitsound/458zn.wav,
  170. sound4: fruitsound/14454cl.wav,
  171. sound5: fruitsound/794yr.wav,
  172. sound6: fruitsound/14455fx.wav,
  173. sound7: fruitsound/14456wt.wav,
  174. sound8: fruitsound/477lz.wav,
  175. sound9: fruitsound/5357lyz.wav,
  176. sound10: fruitsound/10560llf.wav,
  177. sound11: fruitsound/5367ch.wav,
  178. sound12: fruitsound/1989ljz.wav">
  179. <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>
  180. </applet>
  181. <br>
  182. <table border=1 BGCOLOR="#990099" >
  183. <tr>
  184. <td><a href="javascript:checkit(1)"><img src="blankdot.gif" border=0 name="pic1" width=64 height=64></a></td>
  185. <td><a href="javascript:checkit(2)"><img src="blankdot.gif" border=0 name="pic2" width=64 height=64></a></td>
  186. <td><a href="javascript:checkit(3)"><img src="blankdot.gif" border=0 name="pic3" width=64 height=64></a></td>
  187. <td><a href="javascript:checkit(4)"><img src="blankdot.gif" border=0 name="pic4" width=64 height=64></a></td>
  188. <td><a href="javascript:checkit(5)"><img src="blankdot.gif" border=0 name="pic5" width=64 height=64></a></td>
  189. </tr>
  190. <tr>
  191. <td><a href="javascript:checkit(6)"><img src="blankdot.gif" border=0 name="pic6" width=64 height=64></a></td>
  192. <td><a href="javascript:checkit(7)"><img src="blankdot.gif" border=0 name="pic7" width=64 height=64></a></td>
  193. <td><a href="javascript:checkit(8)"><img src="blankdot.gif" border=0 name="pic8" width=64 height=64></a></td>
  194. <td><a href="javascript:checkit(9)"><img src="blankdot.gif" border=0 name="pic9" width=64 height=64></a></td>
  195. <td><a href="javascript:checkit(10)"><img src="blankdot.gif" border=0 name="pic10" width=64 height=64></a></td>
  196. </tr>
  197. <tr>
  198. <td><a href="javascript:checkit(11)"><img src="blankdot.gif" border=0 name="pic11" width=64 height=64></a></td>
  199. <td><a href="javascript:checkit(12)"><img src="blankdot.gif" border=0 name="pic12" width=64 height=64></a></td>
  200. <td><img src="lemongame.jpg" border=0 width=64 height=64></td>
  201. <td><a href="javascript:checkit(13)"><img src="blankdot.gif" border=0 name="pic13" width=64 height=64></a></td>
  202. <td><a href="javascript:checkit(14)"><img src="blankdot.gif" border=0 name="pic14" width=64 height=64></a></td>
  203. </tr>
  204. <tr>
  205. <td><a href="javascript:checkit(15)"><img src="blankdot.gif" border=0 name="pic15" width=64 height=64></a></td>
  206. <td><a href="javascript:checkit(16)"><img src="blankdot.gif" border=0 name="pic16" width=64 height=64></a></td>
  207. <td><a href="javascript:checkit(17)"><img src="blankdot.gif" border=0 name="pic17" width=64 height=64></a></td>
  208. <td><a href="javascript:checkit(18)"><img src="blankdot.gif" border=0 name="pic18" width=64 height=64></a></td>
  209. <td><a href="javascript:checkit(19)"><img src="blankdot.gif" border=0 name="pic19" width=64 height=64></a></td>
  210. </tr>
  211. <tr>
  212. <td><a href="javascript:checkit(20)"><img src="blankdot.gif" border=0 name="pic20" width=64 height=64></a></td>
  213. <td><a href="javascript:checkit(21)"><img src="blankdot.gif" border=0 name="pic21" width=64 height=64></a></td>
  214. <td><a href="javascript:checkit(22)"><img src="blankdot.gif" border=0 name="pic22" width=64 height=64></a></td>
  215. <td><a href="javascript:checkit(23)"><img src="blankdot.gif" border=0 name="pic23" width=64 height=64></a></td>
  216. <td><a href="javascript:checkit(24)"><img src="blankdot.gif" border=0 name="pic24" width=64 height=64></a></td>
  217. </tr>
  218. </table>
  219. <br>
  220. </center>
  221. <script language="javascript">
  222. <!--
  223. var h=0;
  224. var hinfo = "";
  225. var m=0;
  226. var minfo = "";
  227. var s=-1;
  228. var sinfo = "";
  229. var timeCondition = true;
  230. function tellTime(){
  231. s++;
  232. if (s>=60){
  233. s = 0;
  234. m++;
  235. }
  236. else{
  237. if (s<=1)
  238. eval("sinfo = '" + s + " second'");
  239. else
  240. eval("sinfo = '" + s + " seconds'");
  241. }
  242. if (m>=60){
  243. m = 0;
  244. h++;
  245. }
  246. else{
  247. if (m<=1)
  248. eval("minfo = '" + m + " minute '");
  249. else
  250. eval("minfo = '" + m + " minutes '");
  251. }
  252. if (h<=1)
  253. eval("hinfo = '" + h + " hour '");
  254. else
  255. eval("hinfo = '" + h + " hours '");
  256. window.status = hinfo + minfo + sinfo;
  257. if (timeCondition == true)
  258. setTimeout("tellTime()", 1000);
  259. }
  260. //-->
  261. </script>
  262. </body>
  263. </html>