Advertisement
Guest User

Untitled

a guest
Apr 19th, 2015
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. <!--
  2. krpano
  3. - animated hotspots example
  4. - for Flash and HTML5
  5. -->
  6.  
  7. <krpano>
  8.  
  9. <!-- pano -->
  10. <preview url="../../panos/p2/preview.jpg" />
  11. <image>
  12. <cube url="../../panos/p2/pano_%s.jpg" />
  13. </image>
  14.  
  15. <!-- view settings -->
  16. <view hlookat="0" vlookat="0" fovtype="MFOV" fov="90" fovmin="60" fovmax="120" />
  17.  
  18.  
  19. <!-- hotspot style predefines - black hotspot -->
  20. <style name="hotspot_ani_black"
  21. url="hotspot_ani_black_64x64x20.png"
  22. crop="0|0|64|64"
  23. framewidth="64" frameheight="64" frame="0" lastframe="19"
  24. onloaded="hotspot_animate();"
  25. />
  26.  
  27. <!-- hotspot style predefines - white hotspot -->
  28. <style name="hotspot_ani_white"
  29. url="hotspot_ani_white_64x64x20.png"
  30. crop="0|0|64|64"
  31. framewidth="64" frameheight="64" frame="0" lastframe="19"
  32. onloaded="hotspot_animate();"
  33. />
  34.  
  35. <!-- hotspot animation action -->
  36. <action name="hotspot_animate">
  37. inc(frame,1,get(lastframe),0);
  38. mul(ypos,frame,frameheight);
  39. txtadd(crop,'0|',get(ypos),'|',get(framewidth),'|',get(frameheight));
  40. delayedcall(0.03, if(loaded, hotspot_animate() ) );
  41. </action>
  42.  
  43.  
  44. <!-- example hotspots -->
  45. <hotspot name="spot1" style="hotspot_ani_black" ath="-25" atv="-10" onclick="showlog(); trace('hotspot ',get(name),' clicked');" />
  46. <hotspot name="spot2" style="hotspot_ani_black" ath="-15" atv="+10" onclick="showlog(); trace('hotspot ',get(name),' clicked');" />
  47. <hotspot name="spot3" style="hotspot_ani_white" ath="+15" atv="-10" onclick="showlog(); trace('hotspot ',get(name),' clicked');" />
  48. <hotspot name="spot4" style="hotspot_ani_white" ath="+25" atv="+10" onclick="showlog(); trace('hotspot ',get(name),' clicked');" />
  49.  
  50. </krpano>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement