3 <template thisbox="window" orient="vertical" width="394" height="276">
5 KeyPressed += function(k) { if (k == "escape") thisbox = null; }
7 var progress = function(n, d) {
8 $innerbar.width = $bar.width * n / d;
12 xwt.thread = function() {
13 var img = xwt.org.xwt.builtin["splash.png"];
16 x = (xwt.screenWidth - width) / 2;
17 y = (xwt.screenHeight - height) / 2;
18 var origin = xwt.origin;
19 if (origin.substring(0, 21) == "http://launch.xwt.org") {
20 origin = origin.substring(22);
21 origin = "http://" + origin.substring(origin.indexOf('/') + 1);
23 xwt.println("origin is " + origin);
24 var new_rr = xwt.unzip(xwt.watchProgress(xwt.load(origin), progress));
25 var new_xwt = xwt.clone(new_rr);
26 new_xwt.apply(xwt.box, new_xwt["main.xwt"]);
29 <box packed="false" id="bar" x="20" y="236" width="354" height="18" align="left">
30 <box id="innerbar" fill="blue" width="10"/>