ATTENTION!
-
When running this applet for the first time, some sound glitches
may arise; that is just how Java 1.0.2. works.
|
Name | Value | Description/Comments | |
width | number | e.g. <applet
code="VideoSlot.class" width="160"
height="90"> When the "width" is set to 160, coins stack-up on top of each other infinently. If the value is larger than 160, the coins span the area of the applet. Note that the width of the applet without the coin panel is 124 pixels wide. In "match4" mode (see bellow) the numbers are 200 and 165 respectively i.e. 200 coin stack-up and 165 no coins panel. |
|
height | number | e.g. <applet
code="VideoSlot.class" width="160"
height="90"> The height parameter can be either 90 or 80. |
|
credits | number | e.g. <param name="credits"
value="3"> The credit the user gets to start with. Default is 5. |
|
limit | number | e.g. <param name="limit"
value="10"> The amount of credits required to win. Default is 10. |
|
value | number | e.g. <param name="value"
value="100"> A multiplier for the credits. Default is 1. |
|
sound | boolean | e.g. <param name="sound"
value="on"> Turns the sound on/off. Default is on. |
|
verify | boolean | e.g. <param name="verify"
value="on"> Makes the applet display a unique code, every time a user wins. Default is off. |
|
speed | number | e.g. <param name="speed"
value="10"> Performance factor. If the applet is running too fast or too slow, adjust this parameter. 1 is fastest. Default is 5. |
|
autolink | boolean | e.g. <param name="autolink"
value="on"> Makes the applet automatically go to the link specified in the "link" parameter. Default is off, meaning that the user must click upon the applet to go to the winning link. Note that with this parameter set on, you can't see the winning picture because it is pointless. |
|
link | URL | e.g. <param name="link"
value="http://your.link.com"> The applet's destination link upon winning. Note however, that with the unregistered version the user will be able to see this link by viewing the source of the page. You can also insert the {getExtendedCode()} macro anywhere in the link. e.g. <param name="link" value="mailto:youremail@com?subject=User with code {getExtendedCode()} is indeed a winner."> Again, you will need the register the applet to decipher the code, but, to offer you something, the last 3 numbers of the code (separated with "-") is the user's current score, limit and spin count. Default setting is no link. |
|
victory | URL or relative dir. |
e.g. <param name="victory"
value="Images/victory1.gif"> Lets you specify the winning picture. Default is "Images/victory.gif". |
|
defeat | URL or relative dir. |
e.g.
<param name="defeat" value="Images/tryagain.gif"> Lets you specify the losing picture. Default is "Images/defeat.gif" |
|
bkcolor | hexadecimal | e.g. <param name="bkcolor"
value="#FF00000"> Lets you specify the coins panel background color. Default is red. |
|
bkimage | URL or relative dir. |
e.g. <param name="bkimage"
value="Images/backdrop.gif"> Lets you specify the coins panel background image. Default is no image. |
|
coins | boolean | e.g. <param name="coins"
value="off"> Display the coins in the coins panel. Default is on. |
|
3D | enumerated | e.g. <param name="3D"
value="low"> Display the applet in a 3D perspective. Valid values are "high", "low" and "off". Default is off. |
|
match4 | boolean | e.g. <param name="match4"
value="on"> Display four slot-columns instead of three. In this mode, you must match four of a kind to win. Very hard. Default is off. |
|
target | text | e.g. <param name="target"
value="_blank"> Specifies the frame in which the "link" parameter will be opened. Default is "_top". |
Method | Returns | Description/Comments | |
roll() | void | e.g. document.applets[0].roll() Spins the reels if possible i.e. if you haven't already lost first. |
|
getScore() | int | e.g. if (document.applets[0].getScore()
< 0) alert("You lose, I win!"); Returns the current amout of credits multiplied by the applet's "value" parameter. |
|
getLimit() | int | e.g. if (document.applets[0].getScore()
>= document.applets[0].getLimit()) alert("You
win, I lose!"); Returns the amount of credits you must reach in order to win in the applet. This is set by the applet's "limit" parameter. |
|
getCode() | String | e.g. alert("My
winning code is " + document.applet[0].getCode()); Returns a uniquely generated code every time the applet wins. You need to be a registered user to decipher it though. Additionally, you must have first reached the applet's winning limit for this method to return a correct value. |
|
getSpinCount() | int | e.g. if (document.applets[0].getSpinCount()
== 100) alert("This might be a bad time to
mention this, but you can press CTRL and click on
the applet at the same time for it to
automatically spin the reels for you."); Returns the total number of reel spins and through as many instances of the applet currently loaded. In other words, it accesses a static var. |
|
getExtendedCode() | String | e.g. document.applets[0].setLink( "http:/eg.com/check.cgi?code={getExtendedCode()}&test=123"); Returns getCode() + getScore() + getLimit() + getSpinCount() all numbers separated by the minus symbol "-". Notice also how the function is called from within the string value in the example above. When the user wins, the applet will attempt to go to a URL like this: http:/eg.com/check.cgi?code=72474347E-50-50-30&test=123 This feature is provided because, calling the getExtendedCode() method directly at the wrong time i.e. when you haven't won, will produce an erroneuous value. So, if you where to do something like this: e.g. document.applets[0].setLink( "http:/eg.com/check.cgi?code=" + document.applets[0].getExtendedCode() + "&test=123"); and if the above snippet was called before the applet is in a winning state, the URL would be for example: http:/eg.com/check.cgi?code=-50-50-0&test=123 which is of coarse, wrong. |
|
setLink() | void | e.g. document.applets[0].setLink("http:\\example.com/youwin.html"); Set the applet's destination upon winning. This is similar to specifying the "link" parameter. You can if you wish, embed the getExtendedCode() method in the link (See getExtendedCode() above). |
|
Fields | Type | Description/Comments | |
sound | boolean | e.g. document.applets[0].sound
= false; Turns sound on or off. |
|
speed | int | e.g. document.applets[0].speed
= 1; Makes the applet spin fast or slow. The value 1 is the fastest. |
|
autospin | boolean | e.g. document.applets[0].autospin
= true; Allows the applet to spin the reels automatically, whithout the need of clicking upon the applet itself. |
|
loaded | boolean | e.g.
if (document.applets[0].loaded) alert("Are
you ready?"); Is "true" when the applet is finished loading its graphics. |
|
showCoins | boolean | e.g.
document.applets[0].showCoins = true; If "true" displays coin graphics in the applet's coin panel. This is similar to setting the applet's "coins" parameter. |
|
target | String | e.g.
document.applets[0].target = "_top"; When the applet attempts to go to a winning link, you can specify in which frame you would like this to happen. This is similar to setting the applet's "target" parameter. |
Enjoy!