
<krpano version="1.0.8">
    <events onloadcomplete="plugin[combobox].selectitem(kamenshik7);"/>
    <view fisheye="0" limitview="lookat" vlookatmin="-90" vlookatmax="90" fovmin="5" fovmax="170" fov="90" hlookat="0" vlookat="0"/>
    <autorotate horizon="0" tofov="90"/>
    <action name="looktohome">lookto(0,0,90);</action>
    <preview url="kamenshikdata/kamenshik0/preview.jpg"/>
   <image type="CUBE">
        <left url="images/kamenshik7_l.jpg"/>
        <front url="images/kamenshik7_f.jpg"/>
        <right url="images/kamenshik7_r.jpg"/>
        <back url="images/kamenshik7_b.jpg"/>
        <up url="images/kamenshik7_u.jpg"/>
        <down url="images/kamenshik7_d.jpg"/>
    </image>
	
	<plugin name="snow" url="plugins/snow.swf" blendmode="normal" type="image" imageurl="snow.png" imagescale="0.3" count="10000" color="0xFFFFFF" floor="0.3" speed="0.3" spreading="2.0" shake="0.0" speedvariance="3.0"/>
	
	
	
	<plugin name="soundinterface" url="plugins/soundinterface.swf" rootpath="%CURRENTXML%" preload="true" />
	<plugin name="btn10" url="images/real_logo_trans_krpano.png" x="5" y="90" zorder="500" align="rightbottom"    />
	<plugin name="btn11" url="images/real_logo_trans_krpano1.png" x="5" y="90" zorder="500" align="leftbottom"    />
	<plugin name="btn2" url="perehod1.png" x="160" y="35" zorder="500" align="righttop" onclick="" />
    <plugin name="btn3" url="perehod2.png" x="5" y="35" zorder="500" align="righttop" onclick=""  />
	<plugin name="btn5" url="home.png" x="170" y="35" zorder="500" align="lefttop" onhover="showtext(Домой);" onclick="loadpano(kamenshik8.xml, null, MERGE, BLEND(1));"   />
	<plugin name="btn4" url="profi.png" x="5" y="35" align="lefttop" />
	<plugin name="btn9" url="gramma.png" x="282" y="35" zorder="500" align="lefttop" onhover="showtext(Профессиограмма);" onclick="openurl(pdf/kamenshik.pdf,_blank);"   />
	<plugin name="btn6" url="off.png" x="394" y="35" zorder="500" align="lefttop" onhover="showtext(Выключить звук);" onclick="togglepause();stopallsounds"    />
	<plugin name="btn7" url="on.png" x="338" y="35" zorder="500" align="lefttop" onhover="showtext(Включить звук);" onclick="plugin[combobox].selectitem(p4);playsound(forest, sound1.mp3, 1);"   />
	
	<plugin name="btn8" url="pict/intro1.png" x="450" y="35" zorder="500" align="lefttop" />
	
	<plugin name="btn" url="question.png" x="226" y="35" zorder="500" align="lefttop" onhover="showtext(Справка);" onover="action(fadein,img1);" onout="action(fadeout,img1);" />
	<plugin name="img1" url="info.png" zorder="1000" align="center" alpha="0" visible="false" z-order="1000" />
	
	<action name="hideSplash">
		action(fadeout, splash); 
		action(fadein, tutor);
	</action>
	
	
	<include url="actions_inc.xml"/>
	
	
	
	<events onloadcomplete="delayedcall(2, hideintroimage() ); set(events.onloadcomplete,null);playsound(forest, sound1.mp3, 1);" />
	<plugin name="introimage"
	        url="intro1.png"
	        align="center"
	        onloaded="set(alpha,0); tween(alpha,1.0);"
	        onclick="hideintroimage();"
	        />
	
	<action name="hideintroimage">
		if(plugin[introimage].enabled,
			set(plugin[introimage].enabled,false);
			tween(plugin[introimage].alpha, 0.0, 2, default, );
		  );
	</action>
	
	
	<hotspot name="videospot1" style="flyoutvideo"
			 url="plugins/videoplayer.swf" 
			 videourl="video/video1.flv"
			 distorted="true"
			 ath="61.0577" atv="0.0000"
			 edge="center"
			 scale="0.9"
			 buffertime="10.0"
			 rx="0"
			 ry="0"
			 rz="0"
			 loop="true"
			 pausedonstart="true"
			 directionalsound="true"
			 range="110"
			 tiledimagewidth = "8192"
			 tiledimageheight = "4096"
			 tilesize = "1024"
			 volume="0.3"
			 onhover="if(ispaused, showtext(click to play), showtext(click to pause));"
			 onclick="togglepause();"
			 
			 zorder="2"
			 />
			 
			 <style name="flyoutvideo"
	       distorted="true"
	       backup_rx="0"
	       backup_ry="0"
	       backup_rz="0"
	       backup_scale="0"
	       backup_zorder="0"
	       flying="0.0"
	       flystate="0"
		   onhover="if(ispaused, showtext(Воспроизвести), showtext(Остановить));"
	       onclick="if(flystate == 0, resume();flyout_by_name('videospot1');flyout_by_name('pod');set(autorotate.enabled,false);,flyback_by_name('videospot1') ;stop();flyback_by_name('pod') ;set(autorotate.enabled,true));	"
	       />
			 
			 <style name="hidden_flyoutimage"
 distorted="true"
 backup_rx="0"
 backup_ry="0"
 backup_rz="0"
 backup_scale="0"
 backup_zorder="0"
 flying="0.0"
 flystate="0"
 visible="false"
 alpha="0"
 onclick="if(flystate != 0, hidden_flyback_by_name(get(name)) );"
 />

 







<action name="play_hotsound">
	pausesound(forest);
	playsound(hotsound,%1);
</action>

<action name="stop_hotsound">
	stopsound(hotsound);
	resumesound(forest);
</action>


<action name="hidden_flyout_by_name">
 <!-- make all other hotspots flying back -->
 flyback_others();

 <!--
 for best control set 4 fly states:
 0 = normal
 1 = while flying out
 2 = out
 3 = while flying back
 -->

 <!-- save original position/rotation -->
 if(hotspot[%1].flystate == 0,
 set(hotspot[%1].visible, true);
 copy(hotspot[%1].backup_rx, hotspot[%1].rx);
 copy(hotspot[%1].backup_ry, hotspot[%1].ry);
 copy(hotspot[%1].backup_rz, hotspot[%1].rz);
 copy(hotspot[%1].backup_scale, hotspot[%1].scale);
 copy(hotspot[%1].backup_zorder, hotspot[%1].zorder);
 copy(hotspot[%1].backup_alpha, hotspot[%1].alpha);
 );

 <!-- set new state -->
 set(hotspot[%1].flystate,1);
 set(hotspot[%1].zorder,99);

 <!-- tween the rotations values to 0 for a flat screen view -->
 tween(hotspot[%1].alpha, 1);
 tween(hotspot[%1].rx, 0);
 tween(hotspot[%1].ry, 0);
 tween(hotspot[%1].rz, 0);
 tween(hotspot[%1].scale, 1.5, 0.5, default, play_hotsound(get(hotspot[%1].snd_url)););

 <!--
 tween 'flying' to 1.0,
 this makes the hotspot independent from the panorama rotation and scaling
 -->
 tween(hotspot[%1].flying, 1.0, 0.5, default, set(hotspot[%1].flystate,2); );
 </action>

 <action name="hidden_flyback_by_name">
 stop_hotsound();
 if(hotspot[%1].flystate != 3,
 set(hotspot[%1].flystate,3);

 <!-- tween back to the stored backup values -->
 tween(hotspot[%1].rx, get(hotspot[%1].backup_rx) );
 tween(hotspot[%1].ry, get(hotspot[%1].backup_ry) );
 tween(hotspot[%1].rz, get(hotspot[%1].backup_rz) );
 tween(hotspot[%1].scale, get(hotspot[%1].backup_scale) );
 tween(hotspot[%1].alpha, get(hotspot[%1].backup_alpha),1,default, set(hotspot[%1].visible, false));

 copy(hotspot[%1].zorder, hotspot[%1].backup_zorder);

 <!-- tween 'flying' also back to 0.0 -->
 tween(hotspot[%1].flying, 0.0, 0.5, default, set(hotspot[%1].flystate,0); );
 );
 </action>

 <action name="flyback_others">
 if(%1 != nextloop, set(i,0));

 if(hotspot[%i].style == flyoutimage,
 if(hotspot[%i].flystate != 0, flyback_by_name(get(hotspot[%i].name)); );
 );

 inc(i);
 if(i LT hotspot.count, flyback_others(nextloop); );
 </action>
 
 
 
 <style name="flyoutimage"
	       distorted="true"
	       backup_rx="0"
	       backup_ry="0"
	       backup_rz="0"
	       backup_scale="0"
	       backup_zorder="0"
	       flying="0.0"
	       flystate="0"
	       onclick="if(flystate == 0, flyout_by_name(get(name)), flyback_by_name(get(name)) );"
	       />
		   
		   
		  
		   

	
			 
			 
			 
			 
			 <hotspot name="pod" style="flyoutimage2"
	         url="ramka.png"
	         distorted="true"
	         ath="61.0577" atv="0.0000"
	         scale="1.0"
	         rx="0" ry="0" rz="0"
	         backup_rx="0"
	         backup_ry="0"
	         backup_rz="0"
	         backup_scale="0"
	         backup_zorder="0"
	         flying="0.0"
	         
			 onout=""
			 onclick=""
			 zorder="1"
	         />
 
	
 <action name="flyout_by_name">
		<!-- make all other hotspots flying back -->
		flyback_others();

		<!--
			for best control set 4 fly states:
			0 = normal
			1 = while flying out
			2 = out
			3 = while flying back
		-->

		<!-- save original position/rotation -->
		if(hotspot[%1].flystate == 0,
		    copy(hotspot[%1].backup_rx,     hotspot[%1].rx);
		    copy(hotspot[%1].backup_ry,     hotspot[%1].ry);
		    copy(hotspot[%1].backup_rz,     hotspot[%1].rz);
		    copy(hotspot[%1].backup_scale,  hotspot[%1].scale);
		    copy(hotspot[%1].backup_zorder, hotspot[%1].zorder);
		  );

		<!-- set new state -->
		set(hotspot[%1].flystate,1);
		set(hotspot[%1].zorder,99);

		<!-- tween the rotations values to 0 for a flat screen view -->
		tween(hotspot[%1].rx, 0);
		tween(hotspot[%1].ry, 0);
		tween(hotspot[%1].rz, 0);
		tween(hotspot[%1].scale, 1.5);

		<!--
			tween 'flying' to 1.0,
			this makes the hotspot independent from the panorama rotation and scaling
		-->
		tween(hotspot[%1].flying, 1.0, 0.5, default, set(hotspot[%1].flystate,2); );
	</action>


	<action name="flyback_by_name">
		if(hotspot[%1].flystate != 3,
			set(hotspot[%1].flystate,3);

			<!-- tween back to the stored backup values -->
			tween(hotspot[%1].rx,    get(hotspot[%1].backup_rx)    );
			tween(hotspot[%1].ry,    get(hotspot[%1].backup_ry)    );
			tween(hotspot[%1].rz,    get(hotspot[%1].backup_rz)    );
			tween(hotspot[%1].scale, get(hotspot[%1].backup_scale) );

			copy(hotspot[%1].zorder, hotspot[%1].backup_zorder);

			<!-- tween 'flying' also back to 0.0 -->
			tween(hotspot[%1].flying, 0.0, 0.5, default, set(hotspot[%1].flystate,0); );
		  );
	</action>


	<action name="flyback_others">
		if(%1 != nextloop, set(i,0));
		
		if(hotspot[%i].style == flyoutimage,
			if(hotspot[%i].flystate != 0, flyback_by_name(get(hotspot[%i].name)); );
		  );
		  
		inc(i);
		if(i LT hotspot.count, flyback_others(nextloop); );
	</action>
	
	
	
	
	
	
</krpano>