include("output");
include("bitmap");
include("timer");
// Create a new timer object with 1000ms (1 second) intervals
var t = new timer(3000);
// Set the event to tell the timer what to do each interval
t.event = function()
{
var bmp = new bitmap(30,30);
bmp.clear("#CCCCCC");
var i = 0;
var x;
var y;
while (i < (Math.PI * 2)) {
x = (bmp.width / 2) + (Math.sin(i) * (bmp.width * 0.3));
y = (bmp.height / 2) + (Math.cos(i) * (bmp.height * 0.3));
bmp.setPixel(x, y, "blue");
bmp.setPixel(12, 11, "red");
bmp.setPixel(13, 11, "red");
bmp.setPixel(12, 12, "red");
bmp.setPixel(13, 12, "red");
bmp.setPixel(17, 11, "red");
bmp.setPixel(18, 11, "red");
bmp.setPixel(17, 12, "red");
bmp.setPixel(18, 12, "red");
bmp.setPixel(14, 18, "red");
bmp.setPixel(13, 18, "red");
bmp.setPixel(15, 18, "red");
bmp.setPixel(16, 18, "red");
bmp.setPixel(17, 18, "red");
bmp.setPixel(18, 17, "red");
bmp.setPixel(19, 16, "red");
bmp.setPixel(12, 17, "red");
bmp.setPixel(11, 16, "red");
i += 0.01;
}
write("You better know that, OR FIGURE IT OUT!!");
}
var d = new timer(1000);
d.event = function() {
write("Sordies Awesome!");
}
// Start the timer
t.start();
d.start();
// Stop the timer after 5 second, just to stop the window filling up.
setTimeout(function() { t.stop(); }, 3000);
setTimeout(function() { d.stop(); }, 1000);