Internet for beginners All about Internet in the Philippines

 

 

Make your web graphics move!
By S (mabelle@msc.net.ph)

Who says motion could only be confined to television and films? The World Wide Web is currently teeming with dynamic and graphic-based version of the Internet.

There's a limit to how well motion pictures can be displayed on the Web though.

How do animated images work? Motion pictures work on the principle of persistence of vision -- that is, a series of still images is shown one agter the other as quickly as possible that imprints a kind of continuity between the objects in the pictures. The result is a moving picture.

The World Wide Web still cannot perform anywhere near the acceptable speed standards for persistence of vision. Instead, WWW provides dynamic and moving content through two kinds of animation: pull animation and server-push animation. Only browsers such as Netscape, OS/2 Warp's Web Explorer and Microsoft's Internet Explorer are able to support Web-based animation.

How does pull animation work? Pull animation is the easiest form of moving pictures on the Web. It relies on the viewer's browser to retrieve each animation page one after another through a series of commands to the browser. The images displayed are a few seconds apart, resulting to a slow animation. Perhaps the simplest way to explain the principle of pull animation is by using the example of drawing a series of images on each page of a booklet. When you flip the pages, the image would appear to be moving.

To create pull animation pages, you will need a set of figures that represent an animation sequence. These images should either be in GIF or JPEG fotrmat. Then you will have to create separate Web pages for each image. Just make sure that you put each image at exactly the same place on your HTML page. If you want your animation to travel across your screen, you can control your image's progression across the page with <p> or paragraph tags. After that, you will have to add a META statement to the HEAD section of each of your animation's Web page. Your META statement will instruct your viewer's browser to finish loading the current Web page, wait a specific length of time, and then retrieve the next Web page in the animated sequence. Your META tag will look like this:

	<HEAD>
	<TITLE>Moving Picture!</TITLE>
	<META HTTP:-EQUIV=REFRESH CONTENT="1;
	 URL=http://hostname/directory/filename">
	</HEAD>

This means that you're intructing the browser to wait one second after loading the current page to load the next. If you want the browser to wait longer, you can do this by replacing the one with a larger number. And if you want to have a smooth animation, you can set the value to zero.

Now we go to server-push animation. This type of animation instructs Web server to send a continuous stream of animation data to your viewers' browsers. This is also called a live feed, creating a smooth animation by requiring an open data connection between server and browser. This type of animation puts considerable stress on the Internet pipeline and the server itself. This pipeline includes all of the wiring and data transmission that make up the physical Internet network, which includes phone lines, fiber optic data cables, satellite relay transmissions, and phone cable. If too much information is being moved or transmitted on these same wires at the same time, the system bugs down and it will take a long time for the data to get to its target destination.

CGI (Common Gateway Interface) applications control the animation of GIF files in server-push animation. Perl, C and Visual Basic are the most common programming languages for CGI scripting. For server-push animation, Perl scripts are used. These scripts are distributed freely and you can use those for your own animation. You can access the Server-Push with Perl archive at http://www/romantasy.com/test/server_push.html

There are two main files controlling server-push animation. These are cycleimages.pl and ci_config.pl. The former distributes a series of GIF images in a continuous stream to the reader's Web browser which creates an animated sequence. The ci_config.pl file, on the other hand, lists the GIF file's sequence.

 


Articles in WIRED! Philippines are copyrighted by the authors.
WIRED! Philippines is a monthly online magazine published and hosted by KabayanCentral.com
Copyright 1999 KabayanCentral.com. All rights reserved.