Inheritance through Prototypes: The Animation Library Code - www.docjavascript.com
The Code for the Animation Library
var NS4 = (document.layers) ? 1 : 0;
var IE4 = (document.all) ? 1 : 0;
if (NS4) onload = init;
function init() {
setTimeout("onresize = redo", 1000);
}
function redo() {
location.reload();
}
function animation_toolbox() {
this.show = show;
this.hide = hide;
this.left = left;
this.top = top;
this.moveTo = moveTo;
this.slideBy = slideBy;
this.lineSlide = lineSlide;
this.slideTo = slideTo;
this.circle = circle;
this.circleSlide = circleSlide;
}
function animation_simple(id) {
this.element = (NS4) ? document[id] : document.all[id].style;
this.active = 0;
this.timer = null;
this.name = id + "Var";
eval(this.name + " = this");
}
function animation_nested() {
var args = animation_nested.arguments;
if (NS4) {
this.element = window; // the window object
for (var i = 0; i 0)
eval(shift(ar));
}
return;
}
this.timer = setTimeout(this.name + ".lineSlide(" +
num + ", " + fx + ", " + fy + ", " + tx + ", " +
ty + ", " + sx + ", " + sy + ", " + interval + ")",
interval);
}
function getAngle(angle) {
var small = angle % 360;
if (small 0)
eval(shift(ar));
}
return;
}
this.timer = setTimeout(this.name + ".circleSlide(" +
cx + ", " + cy + ", " + radius + ", " + angle0 + ", " +
angle1 + ", " + increment + ", " + interval + ")", interval);
Produced by Yehuda Shiran and Tomer Shiran
Created: January 18, 1999
Revised: January 18, 1999
URL: https://www.webreference.com/js/column34/code3.html