Concentration Memory Game With Images2. Head Script |
|
More of this FeatureThe script for the memory game is in three parts. The first two part go in the head section of your web page. The first step is to select the code from the text box below (there is a highlight all button beneath it to make this easier) and copy it into a file called memoryh.js. You will need to edit the entries for back and tile to change the values to refer to your images. Just remember to edit the images in your graphics program so that they are all 60 pixels square so that they don't take too long to load (the combined size of the 16 images used for my example is just 4758 bytes so you should have no problem keeping the total under 10k). Next select the code from the text box below and copy it into a file called memory.css. You next attach these into the head section of your page.
<script type="text/javascript"
src="memoryh.js">
</script> <link rel="stylesheet" href="memory.css" type="text/css" /> Now all that remains is to add the body script where you want the game to appear.
Sample Page | Head Script
| Body Script
|

