home
  contacts
  music
html & js
  art
  articles
  contraptions
  downloads
  guestbook


All content displayed on this site is ©2004 DreamQuest4U unless otherwise noted. Design & graphics are also property of DreamQuest.

Useful Codes

< back
Matrix Generator [run the code]
<SCRIPT LANGUAGE="JavaScript">
function matrix(lines,longest,shortest){
var symbols = 10; //number of images availible (if any)
var texted = true; //true if no images are availible or texted version is preferred

if (texted==true){
  var alphasym = new Array("y", "z", "z", "g", "r", "t", "p", "d", "h", "b", "j", "k", "0", "9", "2", "3"); //this is the set of symbols to randomize for a text matrix
  var fontcolors = new Array("", "0c1d0b", "162e15", "163e17", "1c4e1c", "225e22", "2e6830", "3b863e", "3d7c3b", "5ba357", "00ef00");
  symbols=alphasym.length;
  }

document.write("<table border=0 cellpadding=0 cellspacing=0><tr>");
for (c=0;c<lines;c++){
  document.write("<td valign=top>");
  howlong=Math.floor((longest-shortest)*Math.random());
  howlong=howlong-(-shortest);
  shade=Math.floor(7*Math.random());
  shade=shade-(-1);
  for (d=0;d<howlong;d++){
    imag=Math.floor(symbols*Math.random());
    imag=imag+1;
    if (d==howlong-1){ shade=shade-(-2); }
    if (texted==false){ document.write("<img src="+imag+".jpg style=\"filter:alpha(Opacity="+shade+"0)\"><br>"); }
    if (texted==true){ imag--; document.write("<span style=\"FILTER: Glow(Color=#"+fontcolors[shade+1]+", Strength=1); width:10px;font-size:10pt;\"><font face=Courier color=#"+fontcolors[shade]+">"+alphasym[imag]+"</font></span><br>"); }
    }
  document.write("</td>");
  }
document.write("</tr></table>");

}
matrix(40,20,2); //using this call line, you can initiate the code wherever you want to
</script>

It is adviced that you only play around with the bits in blue unless you know what the deuce you're doing. Keep that in mind.

Images that you may want to use: