Other Forms of HTML (supported) based Animation/Interactivity/Graphics

 

How is Animation achieved usually --- without HTML

There are forms of media (flash, animated gif) that can be added to your web-pages besides images, sound and video.

Also, languages like JavaScript can be used to achieve annimation. CSS can also be used like JavaScript on the clientside to
achieve animation.

Also, you can do server side programming to achieve it

There is A LOT of interactivity that you can do with CSS, JavaScript on the client side. We are not
going to feature that here (except to mention canvas below) -- instead we are
focusing on some simple things you do with mostly HTML. See discussion on CSS, and JavaScript
for client-side interactivity/ animations. This is just the "TIP" of the iceberg.


Canvas

Canvas is new from HTML 5 --- it allows for drawing on a canvas. It uses JavaScript

A canvas is a rectangular area, and you control every pixel of it.

The canvas element has several methods for drawing paths, boxes, circles, characters, and adding images.

Your browser does not support the canvas element.


Above is a canvas Shown filled in with red --- if your browser supports canvas. Here is the code that produced it:

<canvas id="myCanvas" style="display:none"></canvas>

<script type="text/javascript">
var c=document.getElementById("myCanvas");
var cxt=c.getContext("2d");
cxt.fillStyle="#FF0000";
cxt.fillRect(0,0,150,75);
</script>

See w3schools.com for more examples of canvas drawing ---but, it is your imagination.

Look at the Context object to see what JavaScript methods exist for drawing (i.e. drawImage, drawLine, etc).


Animated Marquee

Here is an example: CST102 is a Cool Class!
How to do:



Options to the Marquee tag:

can set the background color of marquee area. size of bounding box either in percentage or pixels. determine space around marquee area and surrounding text. determines how surrounding text appears in relation to marquee area.





Animation/Presentation Slides: Client Pull and Server Push of Pages



Client Pull







Server Push







Java Applet


We have an entire class in CST that talks about how to create Java programs.Here we will discuss if you have a Java applet how you can include it in yourweb-page. Like with other kinds of media, if it is owned by someone else youmust ask for permission to use it!!!!

Java Applet Filenames
 myApplet.class



How to include in webpage

<APPLET CODE="myApplet.class" WIDTH=X  HEIGH=X></APPLET>         
where X and Y are pixel values determining the size of the applet region.
© Lynne Grewe