-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathloadingpercenttext.xml
40 lines (34 loc) · 1.13 KB
/
loadingpercenttext.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!--
show the loading progress as percent text
- just include once this xml
-->
<krpano>
<!-- loading percent events -->
<events name="loadingpercent" keep="true"
onxmlcomplete="loadingpercent_startloading();"
onloadcomplete="delayedcall(0.25, loadingpercent_stoploading() );"
/>
<!-- loading percent text -->
<layer name="loadingpercent_text" keep="true"
url="%SWFPATH%/plugins/textfield.swf"
align="center"
y="13%"
background="false"
css="color:#FFFFFF; font-family:Arial; font-weight:normal; font-size:12px; font-style:normal;" textshadow="0"
html=""
/>
<!-- loading percent actions -->
<action name="loadingpercent_startloading">
set(loadingpercent_isloading, true);
set(layer[loadingpercent_text].visible, true);
asyncloop(loadingpercent_isloading,
mul(pv, progress.progress, 100);
roundval(pv,0);
txtadd(layer[loadingpercent_text].html, '加载中 ', get(pv), '%');
);
</action>
<action name="loadingpercent_stoploading">
set(loadingpercent_isloading, false);
set(layer[loadingpercent_text].visible, false);
</action>
</krpano>