Hi everybody,
is there a way to make chars to change more quickly?
Here is the script:
<pre>
<script type=”text/javascript”>
var numRows = 40;
var numCols = 80;
var numChars = numRows*numCols;
var linearOrder = new Array;
var randomOrder = new Array;
var whichChar = 0;
for (i=1;i<=numRows;i++) {
document.write(‘<div id=”r’+i+'”>’);
for (j=1;j<=numCols;j++) {
document.write(‘<span id=”r’+i+’s’+j+'”>’+String.fromCharCode(65 + Math.round(Math.random() * 25))+'</span>’);
whichChar++;
linearOrder[whichChar] = i+”-“+j;
}
document.write(‘</div>’);
}
for (p=1;p<=numChars;p++) {
randomSelect = Math.ceil(Math.random() * (numChars-p+1));
randomOrder[p] = linearOrder[randomSelect];
linearOrder[randomSelect] = linearOrder[numChars-p+1];
}
function changeTable(p) {
for (q=p;q<p+10;q++) {
coords = randomOrder[q].split(“-“);
document.getElementById(‘r’+coords[0]+’s’+coords[1]).style.color = ‘#cccccc’;
}
if (q<numChars) setTimeout(“changeTable(“+q+”)”,1);
}
onLoad=setTimeout(“changeTable(1)”,1);
</script>
</pre>
I want to make text-only web pages with this kind of changing, but it lasts too long…
Any idea?
Thanks.