The program consists of a set of Java class-files. Most of these files should be placed in a directory named ps. The other class-files should be in either the file or ui directory. The ps, file, and ui directories must be placed in a directory named embe. The embe directory can be placed anywhere. All directories should be created automatically when you unzip the zip-file. If they aren't you can create the directories manually.
Example of directories: c:/program/PlayerStats/embe/ps c:/embe/ps /home/bob/embe/ps
To insert PlayerStats in a HTML-document you use the APPLET-tag. It has the following syntax:
<APPLET CODEBASE="URL to code" CODE="appletfile" WIDTH="pixels" HEIGHT="pixels"> <PARAM NAME="parametername1" VALUE="parametervalue"> <PARAM NAME="parametername2" VALUE="parametervalue"> ... </APPLET>
There are more attributes available to the APPLET-tag. Anyone interested can find them here.
Optional attribute that states where the program is placed. In this case it is the URL to the directory that contains the embe directory. The URL can be given relatively to the URL of the HTML-document, for example CODEBASE="../program". If this attribute is missing the URL to the HTML-document is used to locate the code. That means that the embe directory is assumed to be in the same directory as the HTML-document.
Required attribute that gives the name of the file to execute. The value of this attribute must be CODE="embe.ps.PlayerStats.class".
Gives the width of the Applet. The recommended value for PlayerStats is 545.
Gives the height of the Applet. The recommended value for PlayerStats is 375.
This attribute is used to give parameters to PlayerStats. The word PARAM is followed by NAME and then the name of the parameter you want to set. Then you write VALUE and the value of the parameter.
Here are all the parameters that can be set.
One reason for slow loading speed is that most applets consist of several files. PlayerStats, for instance, consists of 27 different files that are transferred across the net one at a time. The solution to this problem is to place all the applet-files in an archive and then transfer the archive. Unfortunately the two major browsers (Navigator and Internet Explorer) support different archive types. Navigator uses Zip-files while IE uses Microsoft's own Cabinet fileformat (CAB). However it is possible to combine the two methods and thereby ensure that the applet is transferred as quickly as possible.
Both Zip- and Cab-versions of the program are included in PlayerStats. They are named ps.zip and ps.cab and are placed in the embe directory. Do not unpack these files. It's okay to move the files to another location.
You use the ARCHIVE-attribute in the APPLET-tag to give the location of the Zip-file. If ps.zip is in the embe directory it will look like this:
<APPLET CODE="embe.ps.PlayerStats.class" ARCHIVE="embe/ps.zip" WIDTH=545 HEIGHT=375>
Navigator will now load the entire program in one transfer instead of in several. It's important to leave the 'standard' class-files where they are. They will be used by browsers who don't understand the ARCHIVE-attribute or if something is wrong with the Zip-file.
In the APPLET-tag you use <PARAM NAME=cabbase> to give the location of the Cab-file. If ps.cab is placed in the embe directory it will look like this:
<APPLET CODE="embe.ps.PlayerStats.class" WIDTH=545 HEIGHT=375> <PARAM NAME=cabbase VALUE="embe/ps.cab">
The best solution is to combine the two methods and thereby ensure optimal download performance. It can look like this:
<APPLET CODE="embe.ps.PlayerStats.class" ARCHIVE="embe/ps.zip" WIDTH=545 HEIGHT=375> <PARAM NAME=cabbase VALUE="embe/ps.cab">
The two browsers can now use their own method to load the program. Once
again note that the 'standard' class-files not should be removed.