Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jun 2002
    Location
    Stuck in the inner reaches of my mind
    Posts
    84
    Thanks
    0
    Thanked 0 Times in 0 Posts

    logo script (with limited animation functions)

    Code:
    <html><head>
    <script>
    evil = false;
    if(document.layers){
    	evil = true;
    }
    created = new Array();
    logotext = new Array();
    //Your text here
    logotext[0] = "       *                                  *                                           ";
    logotext[1] = "      * *                                                *                       *    ";
    logotext[2] = "     * * *          ****   ***   ***      *  ***   **** *****  ***   ***  *   * ***** ";
    logotext[3] = "    * * * *         *   * *   * *   *     * *   * *      *    *   * *   *  * *   *    ";
    logotext[4] = "   * *   * *        ****  *     *   *     * ***** *      *    *   * *****   *    *    ";
    logotext[5] = "  * ******* *       *     *     *   * *   * *     *      *    *   * *      * *   *    ";
    logotext[6] = " *************      *     *      ***   ***   ****  ****   *** *   *  **** *   *   *** ";
    logox = 100;
    logoy = 100;
    logocolor = "lightgrey";
    //STOP EDITING!!!
    for(i=0;i<logotext.length;i++){
    logotext[i] = logotext[i].split("");
    }
    var logo = "";
    if(!evil)
    logo += "<div style='position:absolute; top:" + logoy+ "; left:" + logox + ";'>";
    if(evil)
    logo += "<layer top='" + logoy + "' left='" + logox + "'>";
    for(i=0;i<logotext.length;i++){
    for(a=0;a<logotext[i].length;a++){
    if(logotext[i][a]!=" "){
    logoy = i*5;
    logox = a*5;
    if(!evil){
    id = "JT"+i+"x"+a;
    logo += "<div id='" + id + "'style=\"position:absolute; visibility: hidden; width:3px; height:3px; top:" + logoy+ "px; left:" + logox + "px; overflow:hidden; background-color:" + logocolor + ";\" onclick='alert(\"" + id + "\")'></div>\n";
    created[created.length] = id;
    }
    if(evil)
    logo += "<LAYER width='3' height='3' top='" + logoy+ "' left='" + logox + "' bgcolor='" + logocolor + "'></LAYER>\n";
    }
    }
    }
    if(!evil)
    logo += "</div>";
    if(evil)
    logo += "</layer>";
    var Seed = 999;
    function random(max) {
    	var d = (new Date()).getTime();
    	Seed = (d * Math.abs(Math.cos(Seed)));
    	return Math.floor(Seed) % max;
    }
    created2 = created;
    created = created.toString();
    function anilogo(style,ati,whendone){
    if(document.getElementById&&created2.length>0){
    for(i=0;i<10;i++){
    rannum = random(created2.length)
    newone = created2[rannum]+"";
    if(created2.length>0)
    eval("document.getElementById('"+newone+"').style."+style+" = '"+ati+"';");
    if(window.createPopup || (navigator.appName.indexOf('Netscape')!=-1))
    created2.splice(rannum,1);
    }
    }
    if(created2.length<1){
    clearInterval(start);
    eval(whendone);
    }
    }
    function stage1(){
    start = setInterval("anilogo('visibility','visible','stage2()')",100);
    }
    function stage2(){
    created2 = created.split(",");
    start = setInterval("anilogo('background','black','stage3()')",100);
    }
    function stage3(){
    created2 = created.split(",");
    start = setInterval("anilogo('background','green','stage4()')",100);
    }
    function stage4(){
    created2 = created.split(",");
    start = setInterval("anilogo('visibility','hidden','')",100);
    }
    </script></head>
    <body onload="stage1();">
    <script>
    document.write(logo);
    </script>
    </div>
    
    
    </body></html>
    logotext[X]
    Is where one line of the logo goes.

    logox = 100;
    logoy = 100;

    the x and y cord of where you want the logo to be

    logocolor = "lightgrey";
    the color of the logo

    Code:
    function stage1(){
    start = setInterval("anilogo('visibility','visible','stage2()')",100);
    }
    function stage2(){
    created2 = created.split(",");
    start = setInterval("anilogo('background','black','stage3()')",100);
    }
    function stage3(){
    created2 = created.split(",");
    start = setInterval("anilogo('background','green','stage4()')",100);
    }
    function stage4(){
    created2 = created.split(",");
    start = setInterval("anilogo('visibility','hidden','')",100);
    }
    this is where the animation stuff is controled. If you want it should be pretty easy to figure out. Otherwise I will look through it later and figure it out...

  • #2
    New Coder
    Join Date
    Jun 2002
    Location
    Stuck in the inner reaches of my mind
    Posts
    84
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Oh yeah, the logo is compatiable in IE5+ and NS6(Mozilla)+ and NetScape 4. The animation is IE5+ and NS6+ only. This is from my memory as I only have Mozilla 1 installed right now...


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •