comparison nodejs/examples/mce/mainmenu.js @ 932:bd9b0142fc7e

Update the sample application. We can use the ./test5 to test it now. It will download the image from the VOD server and render it in the screen.
author wycc
date Tue, 09 Nov 2010 07:41:52 +0800
parents 30cd14b11bc7
children e45ad25a1462
comparison
equal deleted inserted replaced
931:3a3734289523 932:bd9b0142fc7e
4 var mbapp = require("mbapp"); 4 var mbapp = require("mbapp");
5 var sys=require("sys"); 5 var sys=require("sys");
6 var animate=require("animate"); 6 var animate=require("animate");
7 var fs = require("fs"); 7 var fs = require("fs");
8 var EPG = require('./epg'); 8 var EPG = require('./epg');
9 9 /**
10 * We will fetch the EPG file from the server and fetch all images required for the main category from it.
11 * If these files are cached, we will not fetch it again. Otherwise, we will fetch them. The EPG class is
12 * responsible for the cache management.
13 */
10 function MainMenu(app) 14 function MainMenu(app)
11 { 15 {
12 var self = this; 16 var self = this;
13 //var epg = new EPG.EPG(); 17 var epg = new EPG.EPG();
14 //epg.registerInitDone(function() { self.init();}); 18 epg.registerInitDone(function() { self.init();});
15 self.init(); 19 //self.init();
16 } 20 }
17 MainMenu.prototype.init=function() 21 MainMenu.prototype.init=function()
18 { 22 {
19 app.loadSVG("main.svg"); 23 app.loadSVG("main.svg");
20 24