JavaScript Animations, Part I: The Entire Document - Doc JavaScript | WebReference

JavaScript Animations, Part I: The Entire Document - Doc JavaScript


The Entire Document

<HTML>
<HEAD>
<TITLE>Title Here</TITLE>
</HEAD>
<BODY>
.
.
.
<DIV ID="ball1" STYLE="position: absolute; left: 200; -->
top: 200; width: 50;"><IMG SRC="ball1.gif" WIDTH="50" -->
HEIGHT="50"></DIV>
<DIV ID="ball2" STYLE="position: absolute; left: 350; -->
top: 480; width: 25;"><IMG SRC="ball2.gif" WIDTH="25" -->
HEIGHT="25"></DIV>
.
.
.
<SCRIPT LANGUAGE="JavaScript1.2">
<!--
document.write("<SCRIPT SRC='animate.js'></SCRIPT>");
onload = start;
function start() {
  anim1 = new animation("ball1");
  if (!anim1.element) return;
  anim2 = new animation("ball2");
  anim2.slideBy(200, -300, 256, 30, "anim1.slideBy(320, -->
-150, 99, 50, 'anim1.circle(230, 0, -180, 100, 30)')");
  anim1.circle(100, 0, -360, 150, 50);
}
// -->
</SCRIPT>
</BODY>
</HTML>

https://www.internet.com


Created: April 21, 1998
Revised: April 21, 1998

URL: https://www.webreference.com/js/column18/code1.html