Inheritance through Prototypes: The Nested Animation Code - www.docjavascript.com | WebReference

Inheritance through Prototypes: The Nested Animation Code - www.docjavascript.com


The Code and HTML for the Nested Animation

<DIV ID="balls" STYLE="position: absolute; left: 200; top: 50; width: 150; height: 150;">
<DIV ID="ball1" STYLE="position: absolute; left: 50; top: 50; width: 50;">
<IMG SRC="ball1.gif" WIDTH="50" HEIGHT="50"></DIV>
<DIV ID="ball2" STYLE="position: absolute; left: 125; top: 62; width: 25;">
<IMG SRC="ball2.gif" WIDTH="25" HEIGHT="25"></DIV>
</DIV>
<SCRIPT LANGUAGE="JavaScript1.2">
<!--
document.write("<SCRIPT SRC='animate.js'></SCRIPT>");
onload = start;
function start() {
  anim1 = new animation_nested("balls");
  if (!anim1.element) return;
  anim2 = new animation_nested("balls", "ball2");
  anim1.circle(100, 90, 90, 3, -2, 100);
  anim2.circle(62, 0, null, 0, 3, 25);
}
// -->
</SCRIPT>

https://www.internet.com

Produced by Yehuda Shiran and Tomer Shiran

Created: January 18, 1999
Revised: January 18, 1999

URL: https://www.webreference.com/js/column34/code2.html