topical media & game development

talk show tell print

lib-js-animation-dhtml.htm / htm

                  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
                  <title>Balls animation test: Silverlight (WPF/e) vs DHTML vs Flash (Flex) vs WPF vs Apollo vs Java (Swing)</title>
                  <link rel="stylesheet" type="text/css" href="lib-js-animation-css-style.css" media="all" />
                  <script type="text/javascript" src="lib-js-animation-js-ball.js"></script>
                  <script type="text/javascript" src="lib-js-animation-js-dhtml.ball.js"></script>
          <body onload="setTimeout('init();', 100); /*this is ugly but it doesn't work otherwise*/">
                  <h2>DHTML animation test <br/><font size="-1">Silverlight (WPF/e) vs DHTML vs Flash (Flex) vs WPF vs Apollo vs Java (Swing)</font></h2>
                  <div id="dhtml">
                          <h3><a href="index.htm">Home</a> <a href="wpfe.htm">Silverlight (WPF/e)</a> DHTML <a href="flex.htm">Flex</a> <a href="flex_bmp.htm">Flex (cached)</a> <a href="java.html">Java (Swing)</a></h3>
                          <p>Also check out <a href="" target="_blank">XBAP (XAML Browser Application)</a> - requires IE on Vista or XP with .NET 3.0 Installed</p>
                          <div id="dhtmlHost" class="host" onclick="">
                                  <div id="dhtml_fps">-- fps</div>
                                  <img id="dhtml_ball_0" src="lib-js-animation-assets-ball.png" alt="ball" />
                          <div id="demoControls">
                                  <a href="#" onclick="_dhtmlTest.start(); return false;">start</a> | <a href="#" onclick="_dhtmlTest.stop(); return false;">stop</a> | 
                                  # of balls: <select onchange="_dhtmlTest.stop();_dhtmlTest.start(this.value);">
                                          <option value="1" >1</option>
                                          <option value="8">8</option>
                                          <option value="16" selected>16</option>
                                          <option value="32">32</option>
                                          <option value="64">64</option>
                                          <option value="128">128</option>
                          <div style="clear: both;"></div>
                  <script language="JavaScript">
DHTML Balls test
parameter: {Object} N

                          function DHTMLTest(N) {
                        , N);
                          extend(DHTMLTest, BallsTest);
                          DHTMLTest.prototype.start = function(N) {
                                  if (!, N)) return;
                                  this._saveContent = document.getElementById("dhtmlHost").innerHTML;
                                  this._ballsO[0] = new DHTMLBall("dhtml_ball_0");
                                  for (var i=1; i<this._N; i++) {
                                          this._ballsO[i] = this._ballsO[0].clone("dhtml_ball_" + i);
                          DHTMLTest.prototype.stop = function(){
                                  if (! return;
                                  document.getElementById("dhtmlHost").innerHTML = this._saveContent;
                          DHTMLTest.prototype._showFPS = function(fps) {
                                  document.getElementById("dhtml_fps").innerHTML = fps + " fps";
                          var _dhtmlTest = new DHTMLTest(16);
                          function init() {

(C) Æliens 18/6/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.