The scaling is calculated differently. The two versions of the dieroll look about the same, but the ActiveX has a size of 100x100, and the applet is sized at 40x40. Here is the source for the Dieroll applet . The JavaScript for this page is almost identical to that for the similar ActiveX page , so you can read the explanation of the script on that page to understand this one. Use View Source to examine the JavaScript yourself.
Seed is a new parameter.
We seed the random number with the time, but noticed in this Java version that when we had two dice on the same page, they always started with the same value, and often would stay in sync, rolling the same number as each other over and over again. As long as each die has a different seed, this will ensure that the two of them use a different seed from each other and still use a different seed each time the page is loaded. If all this has you thinking about Java applets vs ActiveX controls, us too. We've summarized the issues on another page . Copyright Gregory Consulting Limited 1996-2001.