diff nodejs/examples/scribbo/testsvg.js @ 1403:c297ceec37f2

Add exaple to illustrate the update bug
author wycc
date Sun, 03 Apr 2011 22:13:37 +0800
parents 76d2aad5da35
children
line wrap: on
line diff
--- a/nodejs/examples/scribbo/testsvg.js	Sun Apr 03 18:59:43 2011 +0800
+++ b/nodejs/examples/scribbo/testsvg.js	Sun Apr 03 22:13:37 2011 +0800
@@ -5,10 +5,17 @@
 var sys=require("sys");
 var animate=require("animate");
 var fs = require("fs");
-
-app = new mbapp.app();
-app.loadSVG("test.svg");
-app.runToScene(15);
+var s=0;
+app = new mbapp.app(":0.0",1920,1080);
+app.loadSVG("test1.svg");
+app.addKeyListener(mbapp.KEY_LEFT, function() { 
+    s--;
+    app.runToScene(s);
+});
+app.addKeyListener(mbapp.KEY_RIGHT, function() { 
+    s++;
+    app.runToScene(s);
+});
 app.loop();