loadingpercenttext.xml.backup-2021-02-01-09-39-53 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <!--
  2. show the loading progress as percent text
  3. - just include once this xml
  4. -->
  5. <krpano>
  6. <!-- loading percent events -->
  7. <events name="loadingpercent" keep="true"
  8. onxmlcomplete="loadingpercent_startloading();"
  9. onloadcomplete="delayedcall(2.25, loadingpercent_stoploading() );"
  10. />
  11. <!-- loading percent text -->
  12. <layer name="loadingpercent_text" keep="true"
  13. url="%SWFPATH%/plugins/textfield.swf"
  14. align="center"
  15. y="10%"
  16. background="false"
  17. css="color:#ffffff; font-family:Arial; font-weight:bold; font-size:22px; font-style:italic;" textshadow="2"
  18. html="111111111"
  19. />
  20. <!-- loading percent actions -->
  21. <action name="loadingpercent_startloading">
  22. set(loadingpercent_isloading, true);
  23. set(layer[loadingpercent_text].visible, true);
  24. asyncloop(loadingpercent_isloading,
  25. mul(pvg, progress.progress, 100);
  26. roundval(pvg,0);
  27. txtadd(layer[loadingpercent_text].html, 'Loading ', get(pvg), '%');
  28. );
  29. </action>
  30. <action name="loadingpercent_stoploading">
  31. set(loadingpercent_isloading, false);
  32. set(layer[loadingpercent_text].visible, false);
  33. </action>
  34. </krpano>