this.elem.show(); }; Scene1.hide = function () { this.elem.hide(); }; Scene1.focus = function () { this.handler.focus(); }; Scene1.load = function () { this.init(); }; Scene1.unload = function () { this.hide(); };
The scene.js needs to define functions to be used by each scene’s scenario. The example code uses the most basic functions, including load, focus, show, and unload. The next functions can be used to focus on scene 1. Scene1.load(); Scene1.show(); Scene1.focus();
First, use the load function to activate scene 1. Scene1.load = function () { alert('Scene1 load');
82
Samsung SmartTV Application Development: A Complete Guide