20050116

slide 15 applet installation





First, click Scramble.    Solve.
Drag or click Toggle.    NOTE: WORKS BEST WITH InternetExplorer.   These javascript controls do not work with Netscape browsers, so if anyone is a javascript "guru", please post a comment and let us know what code to add for cross-browser functionality.

Fifty years ago I owned a little plastic Slide 15 Puzzle toy, and although this version uses a mouse instead of my thumbs, it still is a pretty slick little puzzle.    It's for those of us not smart enough for Rubiks Cube.

20050115

the files you'll need to get

One .class file, six .gif images, two sound files, all work together to form the "Slide 15" applet.   Also included is an HTML example showing how to embed the applet on a stand-alone page without codebase.

These files are FREEWARE, and you can get "puzz.zip" from:
http://www.dustyinfo.com/goo/puzz.zip   [ 17 kb download ]
I'm going to assume you know how to download and unzip zip files.
All these files need to be kept together in one directory (folder).

20050114

embed applet code in HTML

Copy the following code with Notepad, insert codebase data, then save with a name of your choice, but with an extension of .html [not .txt].

<html>
<head>
<title>Slide15 Puzzle HTML example using codebase</title>
</head>
<body>
<center>
<table border=0 width=400 height=300 cellpadding=0 cellspacing=0>
    <tr>
       <td>
<applet code=puzz.class width=129 height=128 codebase=http://www.where-files-are.com/ name="game">
<!-- REMOVE CODEBASE IF YOU WANT TO USE APPLET OFF-LINE -->
<!-- CAREFULLY RETAIN name="game"> AT END OF CODEBASE LINE -->
</applet>
<a href="JavaScript:document.game.scramble();"><U>Scramble</U></a>  <a href="JavaScript:document.game.solve();"><U>Solve</U></a><br>Drag or click <a href="JavaScript:document.game.toggle();"><U>Toggle</U></a>
       </td>
    </tr>
</table>
</center>
</body>
</html>

What can be modified?
The only modification you can make to the puzzle is the controls, which could be made into roll-over buttons if you didn't like these text-links.   Changing the size of the applet will produce a gray background but will not change the actual puzzle size.
What is codebase?
Codebase tells the browser where the applet files are located, but if all files (including the HTML file, .class files, and images) are all together in one folder on your own server or local system, you should not specify a CODEBASE.   Likewise, if you are going to use the applet off-line, do not use a CODEBASE.

If you are using something like BLOGGER, then yes, you will definitely need to use a codebase address (since applets and images can't be directly stored on the .blogspot server).
Replace ...where-files-are.com/ with address of where files are stored.
BE EXTRA CAREFUL NOT TO ACCIDENTLY DELETE "name="game">".

20050113

embed code in BLOGGER

As you probably know, images and applet files cannot be uploaded and stored directly on the .blogspot server, so you need to store these files with your web hosting service.

Of course, your BLOGGER webpage needs to know where to dial-up the various files which make up an applet, so that is why that address in CODEBASE needs to be used.

The following is the HTML code you would use to embed the applet into BLOGGER. Basically, this snippet is the same as the preceeding full-length HTML code example, but this snippet has an "A HREF=" anchor-tag which dials-up the applet.   Reminder;  be sure to change the CODEBASE url to match where the .class files, etc., are stored.

<a href="http://www.where-files-are.com/">
<applet code=puzz.class width=129 height=128 codebase=http://www.where-files-are.com/ name="game">
<!-- REMOVE CODEBASE IF YOU WANT TO USE APPLET OFF-LINE -->
<!-- CAREFULLY RETAIN name="game"> AT END OF CODEBASE LINE -->
</applet>
</a>
<a href="JavaScript:document.game.scramble();"><U>Scramble</U></a>  <a href="JavaScript:document.game.solve();"><U>Solve</U></a><br>Drag or click <a href="JavaScript:document.game.toggle();"><U>Toggle</U></a>

20050111

is your installation working?

Did you get it working?
I've only given you the bare-bones here,
so if you need help, post a comment and I'll try to help you out.
You need not sign-up with Blogger if you sign in as anonymous.
There is no spam, ad-ware, or pop-ups on this site.

20050101

OTHER FUN WEBSITES

http://www.breakoutapplet.blogspot.com
http://www.gooapplet.blogspot.com
http://www.rubikscubeapplet.blogspot.com
http://www.soundeffects.blogspot.com
http://www.soundeffects2.blogspot.com
http://www.soundeffects3.blogspot.com
http://www.soundeffects4.blogspot.com