ASCII-animations

Perhaps it is driving you mad that that bird WON'T stop singing. You can make the bird stop by making the animation finite.

Here is a template you can copy and paste into a text document. (Please note that I did not write the Javascript. I copied the script from an Daniel Hunt's finite JavaScript animation and hope that he doesn't mind my broadcasting it about.) If you use the finite script, please ensure that you give due credit to Daniel Hunt. Many thanks to miK for altering the line endings so that it can be viewed on most platforms.

I have just been doing some reading about JavaScript. Apparently some bozos have decided that <script language="JavaScript"> is deprecated. They prefer script type="text/javascript" language="javascript"> now. I have altered the template to reflect that change.

You'll see that while this bears similarities to the basic template, it is rather different. This is how the coding looks for the above animation:

<html>
<head>
<title>your title here</title>
</head>
<body bgcolor="#fff6e9" text="#660000" link="#3366cc" alink="llizard" 
vlink="#333399" onload="tick()">

<b>bird starting and stopping singing</b> --ejm98,99

<script type="text/javascript" language="javascript">

<!-- // hide script
    var agt=navigator.userAgent.toLowerCase();
    if (agt.indexOf("mac") != -1) { var a="\r"; } else { var a="\n"; }
        var max=0;
        function tlist() {
                max=tlist.arguments.length;
                for (i=0; i<max; i++)
                        this[i]=tlist.arguments[i];
        }
        tl = new tlist(

"   \<\") "+a,

"   \>\") "+a,

"   \<\") "+a,

"   \>\") "+a,

"   \<\") "+a,

"   \>\") "+a,

"   \<\") "+a,

"   \>\") "+a,

"   \<\") "+a,

"   \>\") "+a,

"   \<\") "+a

        );
        var x=0;
        function tick() {
                document.f.t.value=" "+a+
        tl[x]+
        "   ( \>\\"+a+   
        "    \" \\\\"+a+
        "       \\  ejm"+a;
                tl[x];
                x++;
                if (x!=max)
                setTimeout("tick()", 70);
		else
		x=0;
        }
// end -->

</script>

<form name="f" action="self">
<textarea name="t" rows="6" cols="15"></textarea>

<input type="button" name="display" value="replay" onclick="tick()">
</form>

<p>Many thanks go to <a href="http://www.mcs.drexel.edu/~udhunt0/ascii.html"
target="_top">Daniel Hunt</a> for the javascript coding that allows a finite
animation.</p>

<p><b>to <a href="https://llizardakaejm.wordpress.com/gallery/ascii-animations/">
llizard's Javascript ASCII-animations</a></b></p>

</body>
</html>

Please review the lesson on optimization if you are having trouble inserting your own animations into this template.

Thanks to Daniel Hunt (was at www.mcs.drexel.edu/~udhunt0/ascii.html) for the javascript coding that allows a finite animation.



                     \ 
                      \,^^%---
                      <\/  \ See? It's easy when you know how....
                      >
                      >^^
                     /| 
ejm                  | \

Oh, yes, and one last reminder, Javascript animations can only be viewed with Netscape3, Opera 3.2b2 and Microsoft Explorer 4 (or higher) that have the Javascript enabled.

When you have made your Javascript ASCII-animation, please tell people about it. Put your animation onto your website and post the URL in the newsgroup alt.ascii-art.animation. Generally, Javascript ASCII-animations have a LOT of text so take up a tremendous amount of room in the newsgroup. Please do not post your whole animation there.



To first part of animation lesson
To second part of animation lesson
To third part of animation lesson
To fourth part of animation lesson
To fifth part of animation lesson
To sixth part of animation lesson