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 xwt.println("loaded " + 100 * (n/d) + "%");
9 $innerbar.width = $bar.width * n / d;
12 xwt.thread = function() {
13 var img = xwt.org.xwt.builtin["splash.png"];
14 xwt.println("img is");
18 x = (xwt.screenWidth - width) / 2;
19 y = (xwt.screenHeight - height) / 2;
20 var origin = xwt.origin;
21 if (origin.substring(0, 21) == "http://launch.xwt.org") {
22 origin = origin.substring(22);
23 origin = "http://" + origin.substring(origin.indexOf('/') + 1);
25 xwt.println("origin is " + origin);
26 var new_rr = xwt.watchProgress(xwt.load(origin), progress);
27 var new_xwt = xwt.clone(new_rr);
30 <box packed="false" id="bar" x="20" y="236" width="354" height="19" align="left">
31 <box id="innerbar" fill="blue" width="0"/>