Diods and ELDs show Message

[Total: 0    Average: 0/5]

This will show a flashing LED display message.

Head Code:

    <script type="text/javascript">

      <!-- Hide procedure for some old browsers


        /*
         *
         *  LEGAL NOTES
         *
         *    Copyright  Massive Core Production 2003. All rights reserved. All use or recreation shall
         *  at all times include this text. "TimeProbe" is written by Tempus of the Massive Core 
         *  Production (MCP). By using this script, you agree to the terms these scripts are based upon. 
         *  Under no situation shall MCP be responsible for any use, damage, harm or any other unpleasant
         *  situation this script may cause. All images are property of MCP. For use of these images, 
         *  include this comment (Legal Notes and Instuctions).
         * 
         *  Note: The name TimeProbe is coming from the original script which was a timer. The current
         *  script have little to do with time, but the name was spared, for simplicity and the basic
         *  methods of this script still apply. However, the time-related part of this script was
         *  removed.
         *
         *
         *  INSTRUCTIONS
         *
         *    To modify this script to your own purpose, read the simple comments I've written all
         *  the way down to the bottom. There are brief explainations almost at every relevant
         *  line, which is of any use to alter. The script simply run with a timeout showing X
         *  numbers of images by reading a multi-dimensional array for instructions. Note that
         *  the multi-dimensional array can only contain characters which is exisiting as an image,
         *  both preloaded, and as an actual image. There are very few special characters following
         *  the original script but they are not hard to add. Also note that a whitespace is an
         *  actual whitespace in the array instructions, and will show the related image to show
         *  a whitespace.
         *
         *  Note: I've also kept the dots and colons for use with time based uses. If you don't want
         *  them to apperar, you can remove them. Just make sure you remove them in the Load() function
         *  and the HTML within the body of the HTML.
         *
         *
         *  VARIABLES
         *
         *    The array called pos is a multidimensional array containing the patterns for the Load()
         *  mode. While waiting for init, the numbers are playing the multidimensional patterns.
         *  This mode have no function at all, but it looks quite nice. I call this it the idle
         *  mode or animation mode of TimeProbe.
         *
         *
         */



        /*
         *
         *  SELECTING COLORS
         *
         *    A note when having random colors or the black color selection in particular, the Netscape
         *  Navigator 4.x does not support the "document.bgColor" transform it seems, so if you having
         *  trouble, I suggest you set the bgcolor attribute in the body to permanent, or if you
         *  want to have the random color, then remove or "comment" the colors[9] array.
         *
         *
         */


        var color = 0;            // 0 random color
                                  // 1 red
                                  // 2 yellow
                                  // 3 cyan
                                  // 4 purple
                                  // 5 green
                                  // 6 lemon
                                  // 7 skyblue
                                  // 8 white
                                  // 9 black

        var anim = 1;             // Toggle Load() animation mode. 0 for off and 1 for on.
        var ptn = 0;              // This decides from witch pattern the animation mode starts with.
        var min = 0;              // Use this to filter the low range of the patterns you wanna run.
        var max = 95;             // Use this to filter the high range of the patterns. Var "min" and
                                  // var "max" and var "min" does not function with negative integers.

        var time;                 // Initialize the time variable witch Timeprobe is based on.

        var colors = new Array(); // Array containing the number, background and foreground colors.

        colors[0] = new Array("random");
        colors[1] = new Array("red", "black", "white");
        colors[2] = new Array("yellow", "black", "white");
        colors[3] = new Array("cyan", "black", "white");
        colors[4] = new Array("purple", "black", "white");
        colors[5] = new Array("green", "black", "white");
        colors[6] = new Array("lemon", "black", "white");
        colors[7] = new Array("skyblue", "black", "white");
        colors[8] = new Array("white", "black", "white");
        colors[9] = new Array("black", "white", "black");   // Black does not work properly on NN4.x

        var pos = new Array();    // The array contains the patterns for the Load() animation state.

        pos[0]  = new Array(" ", " ", " ", " ", " ", " ", " ", " ", " ");
        pos[1]  = new Array(" ", " ", " ", " ", " ", " ", " ", " ", "t");
        pos[2]  = new Array(" ", " ", " ", " ", " ", " ", " ", "t", "i");
        pos[3]  = new Array(" ", " ", " ", " ", " ", " ", "t", "i", "m");
        pos[4]  = new Array(" ", " ", " ", " ", " ", "t", "i", "m", "e");
        pos[5]  = new Array(" ", " ", " ", " ", "t", "i", "m", "e", "p");
        pos[6]  = new Array(" ", " ", " ", "t", "i", "m", "e", "p", "r");
        pos[7]  = new Array(" ", " ", "t", "i", "m", "e", "p", "r", "o");
        pos[8]  = new Array(" ", "t", "i", "m", "e", "p", "r", "o", "b");
        pos[9]  = new Array("t", "i", "m", "e", "p", "r", "o", "b", "e");
        pos[10] = new Array("i", "m", "e", "p", "r", "o", "b", "e", " ");
        pos[11] = new Array("m", "e", "p", "r", "o", "b", "e", " ", "i");
        pos[12] = new Array("e", "p", "r", "o", "b", "e", " ", "i", "s");
        pos[13] = new Array("p", "r", "o", "b", "e", " ", "i", "s", " ");
        pos[14] = new Array("r", "o", "b", "e", " ", "i", "s", " ", "p");
        pos[15] = new Array("o", "b", "e", " ", "i", "s", " ", "p", "r");
        pos[16] = new Array("b", "e", " ", "i", "s", " ", "p", "r", "o");
        pos[17] = new Array("e", " ", "i", "s", " ", "p", "r", "o", "v");
        pos[18] = new Array(" ", "i", "s", " ", "p", "r", "o", "v", "i");
        pos[19] = new Array("i", "s", " ", "p", "r", "o", "v", "i", "d");
        pos[20] = new Array("s", " ", "p", "r", "o", "v", "i", "d", "e");
        pos[21] = new Array(" ", "p", "r", "o", "v", "i", "d", "e", "d");
        pos[22] = new Array("p", "r", "o", "v", "i", "d", "e", "d", " ");
        pos[23] = new Array("r", "o", "v", "i", "d", "e", "d", " ", "f");
        pos[24] = new Array("o", "v", "i", "d", "e", "d", " ", "f", "r");
        pos[25] = new Array("v", "i", "d", "e", "d", " ", "f", "r", "o");
        pos[26] = new Array("i", "d", "e", "d", " ", "f", "r", "o", "m");
        pos[27] = new Array("d", "e", "d", " ", "f", "r", "o", "m", " ");
        pos[28] = new Array("e", "d", " ", "f", "r", "o", "m", " ", "m");
        pos[29] = new Array("d", " ", "f", "r", "o", "m", " ", "m", "a");
        pos[30] = new Array(" ", "f", "r", "o", "m", " ", "m", "a", "s");
        pos[31] = new Array("f", "r", "o", "m", " ", "m", "a", "s", "s");
        pos[32] = new Array("r", "o", "m", " ", "m", "a", "s", "s", "i");
        pos[33] = new Array("o", "m", " ", "m", "a", "s", "s", "i", "v");
        pos[34] = new Array("m", " ", "m", "a", "s", "s", "i", "v", "e");
        pos[35] = new Array(" ", "m", "a", "s", "s", "i", "v", "e", " ");
        pos[36] = new Array("m", "a", "s", "s", "i", "v", "e", " ", "c");
        pos[37] = new Array("a", "s", "s", "i", "v", "e", " ", "c", "o");
        pos[38] = new Array("s", "s", "i", "v", "e", " ", "c", "o", "r");
        pos[39] = new Array("s", "i", "v", "e", " ", "c", "o", "r", "e");
        pos[40] = new Array("i", "v", "e", " ", "c", "o", "r", "e", " ");
        pos[41] = new Array("v", "e", " ", "c", "o", "r", "e", " ", "p");
        pos[42] = new Array("e", " ", "c", "o", "r", "e", " ", "p", "r");
        pos[43] = new Array(" ", "c", "o", "r", "e", " ", "p", "r", "o");
        pos[44] = new Array("c", "o", "r", "e", " ", "p", "r", "o", "d");
        pos[45] = new Array("o", "r", "e", " ", "p", "r", "o", "d", "u");
        pos[46] = new Array("r", "e", " ", "p", "r", "o", "d", "u", "c");
        pos[47] = new Array("e", " ", "p", "r", "o", "d", "u", "c", "t");
        pos[48] = new Array(" ", "p", "r", "o", "d", "u", "c", "t", "i");
        pos[49] = new Array("p", "r", "o", "d", "u", "c", "t", "i", "o");
        pos[50] = new Array("r", "o", "d", "u", "c", "t", "i", "o", "n");
        pos[51] = new Array("o", "d", "u", "c", "t", "i", "o", "n", " ");
        pos[52] = new Array("d", "u", "c", "t", "i", "o", "n", " ", "2");
        pos[53] = new Array("u", "c", "t", "i", "o", "n", " ", "2", "0");
        pos[54] = new Array("c", "t", "i", "o", "n", " ", "2", "0", "0");
        pos[55] = new Array("t", "i", "o", "n", " ", "2", "0", "0", "3");
        pos[56] = new Array("i", "o", "n", " ", "2", "0", "0", "3", " ");
        pos[57] = new Array("o", "n", " ", "2", "0", "0", "3", " ", "b");
        pos[58] = new Array("n", " ", "2", "0", "0", "3", " ", "b", "y");
        pos[59] = new Array(" ", "2", "0", "0", "3", " ", "b", "y", " ");
        pos[60] = new Array("2", "0", "0", "3", " ", "b", "y", " ", "p");
        pos[61] = new Array("0", "0", "3", " ", "b", "y", " ", "p", "u");
        pos[62] = new Array("0", "3", " ", "b", "y", " ", "p", "u", "l");
        pos[63] = new Array("3", " ", "b", "y", " ", "p", "u", "l", "s");
        pos[64] = new Array(" ", "b", "y", " ", "p", "u", "l", "s", "e");
        pos[65] = new Array("b", "y", " ", "p", "u", "l", "s", "e", "d");
        pos[66] = new Array("y", " ", "p", "u", "l", "s", "e", "d", "r");
        pos[67] = new Array(" ", "p", "u", "l", "s", "e", "d", "r", "i");
        pos[68] = new Array("p", "u", "l", "s", "e", "d", "r", "i", "v");
        pos[69] = new Array("u", "l", "s", "e", "d", "r", "i", "v", "e");
        pos[70] = new Array("l", "s", "e", "d", "r", "i", "v", "e", "r");
        pos[71] = new Array("s", "e", "d", "r", "i", "v", "e", "r", " ");
        pos[72] = new Array("e", "d", "r", "i", "v", "e", "r", " ", " ");
        pos[73] = new Array("d", "r", "i", "v", "e", "r", " ", " ", " ");
        pos[74] = new Array("r", "i", "v", "e", "r", " ", " ", " ", " ");
        pos[75] = new Array("i", "v", "e", "r", " ", " ", " ", " ", " ");
        pos[76] = new Array("v", "e", "r", " ", " ", " ", " ", " ", " ");
        pos[77] = new Array("e", "r", " ", " ", " ", " ", " ", " ", " ");
        pos[78] = new Array("r", " ", " ", " ", " ", " ", " ", " ", " ");
        pos[79] = new Array(" ", " ", " ", " ", " ", " ", " ", " ", " ");
        pos[80] = new Array(" ", " ", " ", " ", " ", " ", " ", " ", " ");
        pos[81] = new Array(" ", " ", " ", " ", " ", " ", " ", " ", " ");
        pos[82] = new Array(" ", " ", " ", " ", " ", " ", " ", " ", " ");
        pos[83] = new Array(" ", " ", " ", " ", " ", " ", " ", " ", " ");
        pos[84] = new Array("t", "i", "m", "e", "p", "r", "o", "b", "e");
        pos[85] = new Array(" ", " ", " ", " ", " ", " ", " ", " ", " ");
        pos[86] = new Array("t", "i", "m", "e", "p", "r", "o", "b", "e");
        pos[87] = new Array(" ", " ", " ", " ", " ", " ", " ", " ", " ");
        pos[88] = new Array("t", "i", "m", "e", "p", "r", "o", "b", "e");
        pos[89] = new Array(" ", " ", " ", " ", " ", " ", " ", " ", " ");
        pos[90] = new Array("t", "i", "m", "e", "p", "r", "o", "b", "e");
        pos[91] = new Array(" ", " ", " ", " ", " ", " ", " ", " ", " ");
        pos[92] = new Array("t", "i", "m", "e", "p", "r", "o", "b", "e");
        pos[93] = new Array(" ", " ", " ", " ", " ", " ", " ", " ", " ");
        pos[94] = new Array(" ", " ", " ", " ", " ", " ", " ", " ", " ");
        pos[95] = new Array(" ", " ", " ", " ", " ", " ", " ", " ", " ");

        if(color == 0){
          color = (Math.floor(Math.random() * (colors.length - 1))) + 1; // Radomize color if random is selected.
        }

        if(max > pos.length){
          max = pos.length - 1;
        }

        if(max < min){
          min = 0;
          max = pos.length - 1;
        }

        var img = new Array();

        document.bgColor = colors[color][1];
        document.fgColor = colors[color][2];

        var source = "http://www.js-examples.com/data/ex_1090/" + colors[color][0] + "/" + colors[color][0];

        if(document.images){

          img[0] = new Image(20, 33);
          img[1] = new Image(20, 33);
          img[2] = new Image(20, 33);
          img[3] = new Image(20, 33);
          img[4] = new Image(20, 33);
          img[5] = new Image(20, 33);
          img[6] = new Image(20, 33);
          img[7] = new Image(20, 33);
          img[8] = new Image(20, 33);
          img[9] = new Image(20, 33);

          img[10] = new Image(3, 19);
          img[11] = new Image(3, 19);
          img[12] = new Image(3, 19);
          img[13] = new Image(3, 19);

          img["a"] = new Image(20, 33);
          img["b"] = new Image(20, 33);
          img["c"] = new Image(20, 33);
          img["d"] = new Image(20, 33);
          img["e"] = new Image(20, 33);
          img["f"] = new Image(20, 33);
          img["g"] = new Image(20, 33);
          img["h"] = new Image(20, 33);
          img["i"] = new Image(20, 33);
          img["j"] = new Image(20, 33);
          img["k"] = new Image(20, 33);
          img["l"] = new Image(20, 33);
          img["m"] = new Image(20, 33);
          img["n"] = new Image(20, 33);
          img["o"] = new Image(20, 33);
          img["p"] = new Image(20, 33);
          img["q"] = new Image(20, 33);
          img["r"] = new Image(20, 33);
          img["s"] = new Image(20, 33);
          img["t"] = new Image(20, 33);
          img["u"] = new Image(20, 33);
          img["v"] = new Image(20, 33);
          img["w"] = new Image(20, 33);
          img["x"] = new Image(20, 33);
          img["y"] = new Image(20, 33);
          img["z"] = new Image(20, 33);
          img[" "] = new Image(20, 33);
          img["+"] = new Image(20, 33);
          img["-"] = new Image(20, 33);
          img["_"] = new Image(20, 33);

          img[0].src = source + "_0.gif";
          img[1].src = source + "_1.gif";
          img[2].src = source + "_2.gif";
          img[3].src = source + "_3.gif";
          img[4].src = source + "_4.gif";
          img[5].src = source + "_5.gif";
          img[6].src = source + "_6.gif";
          img[7].src = source + "_7.gif";
          img[8].src = source + "_8.gif";
          img[9].src = source + "_9.gif";

          img[10].src = source + "_dot.gif";
          img[11].src = source + "_dot_ .gif";
          img[12].src = source + "_dots.gif";
          img[13].src = source + "_dots_ .gif";

          img["a"].src = source + "_a.gif";
          img["b"].src = source + "_b.gif";
          img["c"].src = source + "_c.gif";
          img["d"].src = source + "_d.gif";
          img["e"].src = source + "_e.gif";
          img["f"].src = source + "_f.gif";
          img["g"].src = source + "_g.gif";
          img["h"].src = source + "_h.gif";
          img["i"].src = source + "_i.gif";
          img["j"].src = source + "_j.gif";
          img["k"].src = source + "_k.gif";
          img["l"].src = source + "_l.gif";
          img["m"].src = source + "_m.gif";
          img["n"].src = source + "_n.gif";
          img["o"].src = source + "_o.gif";
          img["p"].src = source + "_p.gif";
          img["q"].src = source + "_q.gif";
          img["r"].src = source + "_r.gif";
          img["s"].src = source + "_s.gif";
          img["t"].src = source + "_t.gif";
          img["u"].src = source + "_u.gif";
          img["v"].src = source + "_v.gif";
          img["w"].src = source + "_w.gif";
          img["x"].src = source + "_x.gif";
          img["y"].src = source + "_y.gif";
          img["z"].src = source + "_z.gif";
          img[" "].src = source + "_ .gif";
          img["+"].src = source + "_+.gif";
          img["-"].src = source + "_-.gif";
          img["_"].src = source + "__.gif";
        }


        /*
         *
         *  FUNCTION LOAD
         *
         *    This function loads the images, and prepares the script ready visually. You can
         *  put any kind of images at load here, but I suggest keeping all the images the same
         *  size.
         *
         */


        function Load(){
          if(anim == 1){
            if(ptn == pos.length || ptn == max){
              ptn = min;
            }
            if(document.images && ptn >= min && ptn <= max){
              document.number9.src = img[pos[ptn][0]].src;
              document.number8.src = img[pos[ptn][1]].src;
              document.number7.src = img[pos[ptn][2]].src;
              document.number6.src = img[pos[ptn][3]].src;
              document.number5.src = img[pos[ptn][4]].src;
              document.number4.src = img[pos[ptn][5]].src;
              document.number3.src = img[pos[ptn][6]].src;
              document.number2.src = img[pos[ptn][7]].src;
              document.number1.src = img[pos[ptn][8]].src;
              document.dot3.src = img[11].src
              document.dots.src = img[13].src
              document.dot2.src = img[11].src
              document.dot1.src = img[11].src
            }
            ptn++;
            setTimeout("Load()", 150);
          }
          else{
            if(document.images){
              document.number9.src = img[0].src;
              document.number8.src = img[0].src;
              document.number7.src = img[0].src;
              document.number6.src = img[0].src;
              document.number5.src = img[0].src;
              document.number4.src = img[0].src;
              document.number3.src = img[0].src;
              document.number2.src = img[0].src;
              document.number1.src = img[0].src;
              document.dot3.src = img[10].src
              document.dots.src = img[13].src
              document.dot2.src = img[10].src
              document.dot1.src = img[10].src
            }
          }
        }
      // end of JavaScript -->
    </script>

Body Code:

You need to insert into your code the onload function like this:<BR />
<body onload="Load()"><BR />
    <center>
      <img src="http://www.js-examples.com/data/ex_1090/red/red_t.gif" name="number9" width="20" height="33">
      <img src="http://www.js-examples.com/data/ex_1090/red/red_dot_ .gif" name="dot3" width="3" height="32">
      <img src="http://www.js-examples.com/data/ex_1090/red/red_i.gif" name="number8" width="20" height="33">
      <img src="http://www.js-examples.com/data/ex_1090/red/red_m.gif" name="number7" width="20" height="33">
      <img src="http://www.js-examples.com/data/ex_1090/red/red_dots_ .gif" name="dots" width="3" height="32">
      <img src="http://www.js-examples.com/data/ex_1090/red/red_e.gif" name="number6" width="20" height="33">
      <img src="http://www.js-examples.com/data/ex_1090/red/red_p.gif" name="number5" width="20" height="33">
      <img src="http://www.js-examples.com/data/ex_1090/red/red_dot_ .gif" name="dot2" width="3" height="32">
      <img src="http://www.js-examples.com/data/ex_1090/red/red_r.gif" name="number4" width="20" height="33">
      <img src="http://www.js-examples.com/data/ex_1090/red/red_o.gif" name="number3" width="20" height="33">
      <img src="http://www.js-examples.com/data/ex_1090/red/red_dot_ .gif" name="dot1" width="3" height="32">
      <img src="http://www.js-examples.com/data/ex_1090/red/red_b.gif" name="number2" width="20" height="33">
      <img src="http://www.js-examples.com/data/ex_1090/red/red_e.gif" name="number1" width="20" height="33">
    </center>

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *