Advertisement
MinecraftRocks999

Untitled

Jan 4th, 2015
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. <html>
  2. <head>
  3. </head>
  4. <body>
  5. <canvas id="canvas" width="500" height="500">Canvas tag not supported!</canvas>
  6. <script>
  7. var b_canvas = document.getElementById("canvas");
  8. var b_context = b_canvas.getContext("2d");
  9. var x = 0;
  10. setInterval(function () {
  11. b_canvas.width = b_canvas.width;
  12. b_context.fillRect(x, 25, 150, 100);
  13. x++;
  14.  
  15. b_context.fillRect(0, 0, 500, 2);
  16. b_context.fillRect(0, 0, 2, 500);
  17. b_context.fillRect(498, 0, 2, 500);
  18. b_context.fillRect(0, 498, 500, 2);
  19. }, 10);
  20. setInterval(function () {x = 0;}, 2000);
  21. </script>
  22. </body>
  23. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement