Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--
- krpano
- - animated hotspots example
- - for Flash and HTML5
- -->
- <krpano>
- <!-- pano -->
- <preview url="../../panos/p2/preview.jpg" />
- <image>
- <cube url="../../panos/p2/pano_%s.jpg" />
- </image>
- <!-- view settings -->
- <view hlookat="0" vlookat="0" fovtype="MFOV" fov="90" fovmin="60" fovmax="120" />
- <!-- hotspot style predefines - black hotspot -->
- <style name="hotspot_ani_black"
- url="hotspot_ani_black_64x64x20.png"
- crop="0|0|64|64"
- framewidth="64" frameheight="64" frame="0" lastframe="19"
- onloaded="hotspot_animate();"
- />
- <!-- hotspot style predefines - white hotspot -->
- <style name="hotspot_ani_white"
- url="hotspot_ani_white_64x64x20.png"
- crop="0|0|64|64"
- framewidth="64" frameheight="64" frame="0" lastframe="19"
- onloaded="hotspot_animate();"
- />
- <!-- hotspot animation action -->
- <action name="hotspot_animate">
- inc(frame,1,get(lastframe),0);
- mul(ypos,frame,frameheight);
- txtadd(crop,'0|',get(ypos),'|',get(framewidth),'|',get(frameheight));
- delayedcall(0.03, if(loaded, hotspot_animate() ) );
- </action>
- <!-- example hotspots -->
- <hotspot name="spot1" style="hotspot_ani_black" ath="-25" atv="-10" onclick="showlog(); trace('hotspot ',get(name),' clicked');" />
- <hotspot name="spot2" style="hotspot_ani_black" ath="-15" atv="+10" onclick="showlog(); trace('hotspot ',get(name),' clicked');" />
- <hotspot name="spot3" style="hotspot_ani_white" ath="+15" atv="-10" onclick="showlog(); trace('hotspot ',get(name),' clicked');" />
- <hotspot name="spot4" style="hotspot_ani_white" ath="+25" atv="+10" onclick="showlog(); trace('hotspot ',get(name),' clicked');" />
- </krpano>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement