<html><head><title>Canvas tutorial</title><script src="../scripts/lib/uploadAnimation.js"></script><script type="text/javascript">function init() {
        draw()
      };
      function draw(){
        var canvas = document.getElementById('tutorial');
        var ani = new UploadAnimation(canvas, 0, 0);
        ani.start();
        /*
        var ctx = canvas.getContext('2d');
        var startX = 25, startY = 25, rectWidth = 6, rectHeight = 6;
        ctx.fillRect(startX, startY, 6, 20);
        ctx.fillRect(*/
        /*
        var img = new Image();
        img.addEventListener('load', function() {
          ctx.drawImage(img,0,0, 48, 48, 5, 5, 48, 48);
          ctx.fillText('我爱我家.doc', 58, 29);
        }, false);
        img.src = '../images/file_types_36x36/file_type_ai.png';
        */
      }</script><style type="text/css">canvas { border: 1px solid black; background-color: grey;}</style><body onload="init()"><canvas id="tutorial" width="150" height="58"></canvas>