<!--
	krpano 1.0.8
	- animated hotspots example
	- for Flash and HTML5
-->

<krpano version="1.0.8" onstart="showtext('[b][i]krpano[br]animated hotspots example[/i][/b]', infostyle);">

	<!-- text style for startup text -->
	<textstyle name="infostyle"
	           origin="center" edge="center" yoffset="-100" textalign="center" background="false" border="false"
	           fontsize="40" textcolor="0xFFFFFF" bold="false" effect="glow(0xFFFFFF,0.7,4,2);glow(0x000000,1,4,2);dropshadow(3,45,0x000000,2,0.6);"
	           showtime="4.0" fadeintime="1.0" fadetime="1.0"
	           />

	<!-- pano -->
	<image type="CUBESTRIP">
		<cubestrip url="pano.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>
