<krpano>
	<!-- global settings for all krpano.com example panoramas -->

	<progress showwait="none" showload="none" />

	<events onxmlcomplete="set(idletime,7); setuppano();"
	        onenterfullscreen="set(plugin[openfs].visible,false); set(plugin[closefs].visible,true);"
	        onexitfullscreen ="set(plugin[openfs].visible,true);  set(plugin[closefs].visible,false);"
	        onidle="oninterrupt(tween(plugin.alpha,1)); tween(plugin.alpha,0);WAIT(99999);"
	        />

	<display movequality="LOW" stillquality="HIGH" movequality10="HIGH" stillquality10="HIGH" />
	<preview details="12" />



	<!-- krpano logo -->
	<plugin name="krpanologo"
	        url="%SWFPATH%/krpano_logo.png"
	        keep="true"
	        align="rightbottom" x="5" y="5"
	        onhover="showtext(go to krpano.com);"
	        visible="false"
	        alpha="0.0"
	        onloaded="if(krpanologo !== false, delayedcall(0.5, set(visible,true); tween(alpha,1.0,1.0);); );"
	        onclick="openurl(http://krpano.com,_self);"
	        />

	<!-- option and editor plugins -->
	<plugin name="options" url="plugins/options.swf" keep="true" />
	<plugin name="editor"  url="plugins/editor.swf"  keep="true" align="lefttop" x="5" y="5" visible="false"  />


	<!-- button showtext() style -->
	<textstyle name="DEFAULT" font="Arial" fontsize="12" bold="true" italic="true"
	           textcolor="0x000000" background="false" border="false"
	           blendmode="layer" effect="glow(0xFFFFFF,0.85,4,4);dropshadow(2,45,0x000000,4,1);"
	           origin="cursor" edge="bottom" xoffset="15" yoffset="-5" showtime="0.1" fadeintime="0.1" fadetime="0.1"
	           />

	<!-- some default buttons (zooming, direction, hotspots on/off, fullscreen) -->
	<style name="button" url="%SWFPATH%/skin/buttons.png" keep="true" 
		   alpha="0.0"
		   onloaded="delayedcall(0.5, tween(alpha,1.0,1.0); );" 
		   />

	<plugin name="in"       align="bottom" x="-160" y="10" style="button" crop="160|0|40|40" onovercrop="160|40|40|40" ondowncrop="160|80|40|40" ondown="set(fov_moveforce,-1);"      onup="set(fov_moveforce,0);" />
	<plugin name="out"      align="bottom" x="-120" y="10" style="button" crop="200|0|40|40" onovercrop="200|40|40|40" ondowncrop="200|80|40|40" ondown="set(fov_moveforce,+1);"      onup="set(fov_moveforce,0);" />
	<plugin name="left"     align="bottom" x="-80"  y="10" style="button" crop=  "0|0|40|40" onovercrop=  "0|40|40|40" ondowncrop=  "0|80|40|40" ondown="set(hlookat_moveforce,-1);"  onup="set(hlookat_moveforce,0);" />
	<plugin name="right"    align="bottom" x="-40"  y="10" style="button" crop= "40|0|40|40" onovercrop= "40|40|40|40" ondowncrop= "40|80|40|40" ondown="set(hlookat_moveforce,+1);"  onup="set(hlookat_moveforce,0);" />
	<plugin name="up"       align="bottom" x="+0"   y="10" style="button" crop= "80|0|40|40" onovercrop= "80|40|40|40" ondowncrop= "80|80|40|40" ondown="set(vlookat_moveforce,-1);"  onup="set(vlookat_moveforce,0);" />
	<plugin name="down"     align="bottom" x="+40"  y="10" style="button" crop="120|0|40|40" onovercrop="120|40|40|40" ondowncrop="120|80|40|40" ondown="set(vlookat_moveforce,+1);"  onup="set(vlookat_moveforce,0);" />
	<plugin name="starbtn"  align="bottom" x="+80"  y="10" style="button" crop="240|0|40|40" onovercrop="240|40|40|40" ondowncrop="240|80|40|40" onhover="showtext(Show/Hide Editor Plugin);" onclick="switch(plugin[editor].visible);" />
	<plugin name="dragmode" align="bottom" x="+120" y="10" style="button" crop="400|0|40|40" onovercrop="400|40|40|40" ondowncrop="400|80|40|40" onhover="showtext(Change Controlmode);"      onclick="action(dragcursor);" visible="true"  />
	<plugin name="movemode" align="bottom" x="+120" y="10" style="button" crop="360|0|40|40" onovercrop="360|40|40|40" ondowncrop="360|80|40|40" onhover="showtext(Change Controlmode);"      onclick="action(qtvrcursor);" visible="false" />
	<plugin name="openfs"   align="bottom" x="+160" y="10" style="button" crop="280|0|40|40" onovercrop="280|40|40|40" ondowncrop="280|80|40|40" onhover="showtext(Fullscreen);"              onclick="set(fullscreen,true);"  visible="true"  />
	<plugin name="closefs"  align="bottom" x="+160" y="10" style="button" crop="320|0|40|40" onovercrop="320|40|40|40" ondowncrop="320|80|40|40" onhover="showtext(Exit Fullscreen);"         onclick="set(fullscreen,false);" visible="false" />


	<!-- right-click context menu to change the viewing settings -->
	<contextmenu>
		<item caption="KRPANO"     />
		<item caption="FULLSCREEN" />
		<item caption="normal view"        onclick="action(view_normal);"        separator="true" />
		<item caption="fisheye view"       onclick="action(view_fisheye);"       />
		<item caption="architectural view" onclick="action(view_architectural);" />
		<item caption="stereographic view" onclick="action(view_stereographic);" />
		<item caption="pannini view"       onclick="action(view_pannini);"       />
		<item caption="little planet view" onclick="action(view_littleplanet);"  />
	</contextmenu>


	<!-- actions to change the mouse cursor -->
	<action name="dragcursor">
		set(plugin[dragmode].visible, false);
		set(plugin[movemode].visible, true);
		set(control.mousetype, drag2D);
		set(cursors.url, %SWFPATH%/skin/drag-cursors.png);
		set(cursors.type, drag);
		set(cursors.move,  2|0|30|32);
		set(cursors.drag, 37|0|30|32);
	</action>

	<action name="qtvrcursor">
		set(plugin[dragmode].visible, true);
		set(plugin[movemode].visible, false);
		set(control.mousetype, moveto);
		set(cursors.url, %SWFPATH%/skin/qtvr-cursors.png);
		set(cursors.type, 8way);
		set(cursors.move,       0|0|16|16);
		set(cursors.drag,      16|0|16|16);
		set(cursors.arrow_u,   32|0|16|16);
		set(cursors.arrow_d,   48|0|16|16);
		set(cursors.arrow_l,   64|0|16|16);
		set(cursors.arrow_r,   80|0|16|16);
		set(cursors.arrow_lu,  96|0|16|16);
		set(cursors.arrow_ru, 112|0|16|16);
		set(cursors.arrow_rd, 128|0|16|16);
		set(cursors.arrow_ld, 144|0|16|16);
	</action>



	<!-- actions for view changing -->
	<action name="view_normal">
		tween(view.fovmax,       150.0, distance(179, 1.00), easeoutquad);
		tween(view.architectural,  0.0, distance(1.0, 0.45), easeoutquad);
		tween(view.fisheye,        0.0, distance(1.0, 0.45), easeoutquad, set(view.stereographic,false); set(view.pannini,false); set(display.flash10,on); );
	</action>


	<action name="view_fisheye">
		set(display.flash10,off);
		tween(view.architectural, 0.0, distance(1.0, 0.30), easeoutquad);
		tween(view.fisheye,       0.0 ,distance(1.0, 0.30), easeoutquad, set(view.stereographic,false); set(view.pannini,false); set(view.fovmax,179); tween(view.fisheye, 0.35, distance(1.0,1.25)); );
	</action>


	<action name="view_architectural">
		tween(view.fovmax,       150.0, distance(179, 1.00), easeoutquad);
		tween(view.architectural,  1.0, distance(1.0, 0.45), easeoutquad);
		tween(view.fisheye,        0.0, distance(1.0, 0.45), easeoutquad, set(view.stereographic,false);set(view.pannini,false);set(display.flash10,on); );
	</action>


	<action name="view_stereographic">
		set(display.flash10,off);

		tween(view.architectural, 0.0, 0.25);

		set(backtonormalfirst,false);
		if(view.pannini       == true,  set(backtonormalfirst,true) );
		if(view.stereographic == false, set(backtonormalfirst,true) );

		if(backtonormalfirst, tween(view.fisheye, 0.0 ,distance(1.0, 0.25), easeoutquad, WAIT); );

		set(view.pannini, false);
		set(view.stereographic, true);
		set(view.fovmax, 150);

		tween(view.fisheye, 1.0, distance(1.0, 0.75), easeoutquad);
	</action>


	<action name="view_pannini">
		set(display.flash10,off);

		tween(view.architectural, 0.0, 0.25);

		set(backtonormalfirst,false);
		if(view.pannini       == false, set(backtonormalfirst,true) );
		if(view.stereographic == false, set(backtonormalfirst,true) );

		if(backtonormalfirst, tween(view.fisheye, 0.0 ,distance(1.0, 0.25), easeoutquad, WAIT); );

		set(view.pannini, true);
		set(view.stereographic, true);
		set(view.fovmax, 150);

		tween(view.fisheye, 1.0, distance(1.0, 0.75), easeoutquad);
	</action>


	<action name="view_littleplanet">
		set(display.flash10,off);

		tween(view.architectural, 0.0, 0.25);

		tween(view.vlookat,  90, distance(179, 1.50), easeoutquad);

		set(backtonormalfirst,false);
		if(view.pannini       == true,  set(backtonormalfirst,true) );
		if(view.stereographic == false, set(backtonormalfirst,true) );

		if(backtonormalfirst, tween(view.fisheye, 0.0 ,distance(1.0, 0.25), easeoutquad, WAIT); );

		set(view.pannini, false);
		set(view.stereographic, true);
		set(view.fovmax, 150);

		tween(view.fisheye, 1.0, distance(1.0, 0.75), easeoutquad);
		tween(view.fov,     150, distance(179, 0.75), easeoutquad);
	</action>



	<!-- setup pano, will be called on the onxmlcomplete event -->
	<action name="setuppano">
		<!-- set qtvr cursor -->
		action(qtvrcursor);

		<!-- disable flash10 for spherical panos and when using the fisheye distortion -->
		if(image.type == SPHERE,  set(display.flash10,off) );
		if(view.fisheye GT 0.0,   set(display.flash10,off) );

		<!-- hide the other view settings in the context menu on partial panos -->
		if(ispartialpano === true, set(showviewitems,false), set(showviewitems,true));

		set(contextmenu.item[2].visible, get(showviewitems));
		set(contextmenu.item[3].visible, get(showviewitems));
		set(contextmenu.item[4].visible, get(showviewitems));
		set(contextmenu.item[5].visible, get(showviewitems));
		set(contextmenu.item[6].visible, get(showviewitems));
		set(contextmenu.item[7].visible, get(showviewitems));
	</action>


</krpano>