Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | Re: FLASH: Trick or Treat has a bug in it! |
From: | William Rosetti |
Date: | Sat, 3 Oct 1998 08:45:51 +0100 |
Hey, when John pointed out that my "Trick or Treat" random picture generator
wasn't exactly random he was right! It does turn things out at around a 55,
35, 10 ratio. What gives? Anyone know the answer, or have an idea as to
where I can find out what the sollution is?
Sincerely,
Al Rosetti
http://www.websitepartners.com
Here is my code for anyone interested...
<SCRIPT language="JavaScript">
<!--
var image_count = 3
function tot(){
var left = Math.round(Math.random()*image_count)
var middle = Math.round(Math.random()*image_count)
var right = Math.round(Math.random()*image_count)
if (left < 1)
left = 1
if (middle < 1)
middle = 1
if (right < 1)
right = 1
eval("document.images['left'].src = 'left_"+left+".JPG'")
eval("document.images['middle'].src = 'middle_"+middle+".JPG'")
eval("document.images['right'].src = 'right_"+right+".JPG'")
}
//-->
</SCRIPT>
------------------------------------------------------------------------
To UNSUBSCRIBE send: unsubscribe flasher in the body of an
email to list-managershocker [dot] com. Problems to: ownershocker [dot] com
N.B. Email address must be the same as the one you used to subscribe.
For info on digest mode send: info flasher to list-managershocker [dot] com
Replies
Re: FLASH: Trick or Treat has a bug in i, John Croteau
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]