<krpano>
    <skin_settings maps="false" maps_type="bing" maps_bing_api_key="" maps_zoombuttons="false" gyro="true" webvr="true"
                   littleplanetintro="false" title="false" thumbs="true" thumbs_width="120" thumbs_height="80"
                   thumbs_padding="10" thumbs_crop="0|40|240|160" thumbs_opened="false" thumbs_text="true"
                   thumbs_dragging="true" thumbs_onhoverscrolling="false" thumbs_scrollbuttons="false"
                   thumbs_scrollindicator="false" thumbs_loop="false" tooltips_buttons="false" tooltips_thumbs="false"
                   tooltips_hotspots="false" tooltips_mapspots="false" deeplinking="false" loadscene_flags="MERGE"
                   loadscene_blend="OPENBLEND(0.5, 0.0, 0.75, 0.05, linear)"
                   loadscene_blend_prev="SLIDEBLEND(0.5, 180, 0.75, linear)"
                   loadscene_blend_next="SLIDEBLEND(0.5, 0, 0.75, linear)" loadingtext="载入中..." layout_width="100%"
                   layout_maxwidth="100%" controlbar_width="100%" controlbar_height="0" controlbar_offset="0"
                   controlbar_offset_closed="-40" controlbar_overlap.no-fractionalscaling="10"
                   controlbar_overlap.fractionalscaling="0" design_skin_images="vtourskin.png" design_bgcolor="0x000000"
                   design_bgalpha="0.5" design_bgborder="0" design_bgroundedge="1" design_bgshadow="0 4 10 0x000000 0.3"
                   design_thumbborder_bgborder="3 0xFDE428 1.0" design_thumbborder_padding="2"
                   design_thumbborder_bgroundedge="0" design_text_css="color:#FFFFFF; font-family:Arial;"
                   design_text_shadow="1"/> 
    <include url="%SWFPATH%/plugins/swipe_gallery.xml"/>
	<include url="%SWFPATH%/plugins/showtext.xml" />
    <autorotate enabled="false" waittime="1.0" speed="-2.0" horizon="0.0" tofov="120.0"/>
    <vtourskinxmlpath url="./"/>
    <include url="%SWFPATH%/plugins/tooltip.xml"/>
    <settings name="auto_thumbs" thumb_size="84" thumb_background_size="90" thumb_spacing="14" left="0" right="0"
              bottom="5" albums_right="0"/>
    <events name="auto_thumbs" keep="true" onresize="resize_auto_thumbs()" onnewscene="update_active_thumb();"
            onxmlcomplete="ifnot(thumbs_intitialized, create_auto_thumbs(); setup_title(); set(thumbs_intitialized, true););"
            onmousedown="hide_container(get(layer[albums].current_container)); fadein_children(albums_scrollarea); set(layer[new_thumbs].visible, false); js(tourguishow()); set(layer[albums].current_container, null);"/>
     <layer name="thumbs_background" scalechildren="true" scale="1" type="container" align="leftbottom" x="0" y="-102"
           width="100%" height="102" maskchildren="false" bgcolor="0x000000" bgalpha="0.4" keep="true"
           state="closed" vr="false" ></layer>
		   <layer name="auto_thumbs" type="container" keep="true" preload="true" scalechildren="true" scale="1"
           align="leftbottom" x="0" y="0" width="50%" height="160" maskchildren="false" bgcolor="0x000000"
           bgalpha="0.0" parent="thumbs_background">
		    <layer
            name="searchscene"
            keep="true"
            style="iconstyle|tooltip"
            crop="500|500|100|80"
            tooltip="搜索场景"
            opened="false"
            visible="false"
            ondown="click_searchsceneXML()"
            y="90"
            x="0"
            edge="right"
            align="righttop"
            width="100"
            height="80"
            />
        <layer name="albums" scalechildren="true" scale="1" type="container" align="leftbottom" x="0" y="0" width="100%"
               height="160" maskchildren="false" bgcolor="0x000000" bgalpha="0.0"
               onout="delayedcall(disable_thumbs, .25, set(layer[new_thumbs].visible, false));">
            <layer name="albums_left_shadow" style="scroll_shadow" align="left" ox="-100%" rotate="180"/>
            <layer name="albums_right_shadow" style="scroll_shadow" align="right"/>
            <layer name="albums_scrollarea" style="scrollarea" width="0" align="center"
                   onscroll="move_thumbs(); show_or_hide_shadows();"
                   onout="delayedcall(fadein, .25, fadein_children(name))"></layer>
        </layer>
        <layer name="new_thumbs" scalechildren="true" scale="1" type="container" align="leftbottom" x="0" oy="0"
               width="100%" height="160" visible="false" maskchildren="false" bgcolor="0x000000" bgalpha="0.0"
               onover="stopdelayedcall(fadein); stopdelayedcall(disable_thumbs); set(visible, true);"
               onout="delayedcall(disable_thumbs, .25, set(layer[new_thumbs].visible, false));">
            <layer name="thumbs_left_shadow" style="scroll_shadow" align="left" ox="-100%" rotate="180"/>
            <layer name="thumbs_right_shadow" style="scroll_shadow" align="right"/>
            <layer name="thumbs_scrollarea" width="100%" style="scrollarea" maskchildren="false"
                   onscroll="show_or_hide_shadows();"></layer>
        </layer>
    </layer>
  <style name="album_thumburl"  align="leftbottom" keep="true" x="9" y="9" 
        alpha="1" width="80" height="80"
         onclick="show_thumbs();"
          />
    
    <style name="album"  url="%SWFPATH%/skin/group2.png"  align="leftbottom" keep="true" oy="0" alpha="1" width="98" height="97" y="-3"
           blendmode="layer" as="album"
           ondown="layer[thumbs_scrollarea].scrolltocenter(0,0);" />

    <style type="container" name="thumb"  align="leftbottom" bgcolor="0xffffff" bgalpha="0.5" bgborder="0" bgroundedge="2" bgshadow="" maskchildren="true" bgcapture="true" keep="true" width="90" height="90"
           onover="fadeout_siblings(name); fadeout_siblings(album);" blendmode="layer"
           onclick="loadscene(get(scene), null, MERGE, BLEND(1));if(parent == albums_scrollarea, hide_container(get(layer[albums].current_container)); );js(setUrl(get(scene)));"/>
		   
    <style name="thumb_image" ox="0" oy="0" width="0" height="0" keep="true" enabled="false"/>

    <style name="thumbs_container" scalechildren="true" scale="1" type="container" align="leftbottom" x="0" y="-100"
           width="100%" height="100" maskchildren="false" bgcolor="0x000000" bgalpha="0.5" keep="true"
           visible="true" state="closed" vr="false" 
          /> 
  <style name="sub_thumbs_container"
          direction="h" onloaded="setcenter(0,0);" 
           scalechildren="true" scale="1" type="container" align="cneter" x="0" y="-5"
         height="100" maskchildren="false"  keep="true" width="0"
         visible="true" state="closed" vr="false" onscroll="move_thumbs(); "
        /> 
    <style name="scrollarea" url="%SWFPATH%/plugins/scrollarea.swf" keep="true" 
           alturl="%SWFPATH%/plugins/scrollarea.js" direction="h" onloaded="setcenter(0,0);"
           onhover_autoscrolling="true"/>
    <style name="thumbs_count" url="%SWFPATH%/plugins/textfield.swf" keep="true" scale="2" align="rightbottom" x="16"
           y="16" html="1" zorder="999999999" width="12" height="11" padding="0 3" roundedge="4" alpha=".95"
           shadow="0.01" shadowalpha=".3" embeddedfontsd="true" enabled="false" onloaded=""
           css="color:#777777;font-family: sans-serif;font-size: 14px;line-height: 23px;font-weight:400;text-align: center;"/>
    <style name="scrollarea" url="%SWFPATH%/plugins/scrollarea.swf" keep="true" 
           alturl="%SWFPATH%/plugins/scrollarea.js" direction="h" onloaded="setcenter(0,0);"
           onhover_autoscrolling="false"/>
    <style name="thumbs_count" url="%SWFPATH%/plugins/textfield.swf" keep="true" scale="2" align="rightbottom" x="16"
           y="16" html="1" zorder="999999999" width="12" height="11" padding="0 3" roundedge="4" alpha=".95"
           shadow="0.01" shadowalpha=".3" embeddedfontsd="true" enabled="false" onloaded=""
           css="color:#777777;font-family: sans-serif;font-size: 14px;line-height: 23px;font-weight:400;text-align: center;"/>
   <style name="scroll_shadow" url="%SWFPATH%/skin/shadow.png" keep="true" x="0" y="0" zorder="99"/>
	
		<!-- 光鱼 -->
	<style name="btn_over_style" onover="set(alpha,0.8);" onout="set(alpha,1.0);" />
	 <style name="group_btn_style" url="%SWFPATH%/skin/bg-group.png" keep="true" align="leftcenter" crop="0|0|80|30" />
    <style name="group_comtainer_style" devices="mobile" y="206" />
    <style name="group_comtainer_style" devices="!mobile" y="200" />
    
	
	 <textstyle name="tooltipTextStyle"
           font="STXihei"   fontsize.no-mobile="14" fontsize.mobile="18" bold="false"
             background="true" backgroundcolor="0x000000" backgroundalpha="0.667"
             border="true" borderwidth="2" bordercolor="0xFFFFFF" roundedge="5"
             textcolor="0xFFFFFF"
             padding="6 10"
             textalign="center"
             yoffset.no-touch="-5"
             yoffset.touch="-40"
           />
	<!-- 缩略图container -->
	<style name="thumb_image_title_container"
		   type="container"
		   bgcolor="0x000000"
		   bgalpha="0.5" 
		   y="32"
		   height="20"
		   width="100%"
		   keep="true"
		   align="center"
	       />
     <!-- 缩略图名称 -->
	<style name="thumb_image_title_word"
	       url="%SWFPATH%/plugins/textfield.swf"
	       background="false"
	       css="color:#FFFFFF;line-height:16px;font-size:12px;text-align:center"
	       enabled="false"
		   width="100%"
		   keep="true"
		   height="20"
	       />
	<style name="thumb_image_title_wordnew"
	       url="%SWFPATH%/plugins/textfield.swf"
	       background="false"
	       css="line-height:16px;font-size:12px;text-align:center"
	       enabled="false"
		   width="100%"
		   keep="true"
		   height="20"
		   onover="set(css,'color:0x000000;');" 
		   onout="set(css,'color:#FFFFFF;');"
		   vcenter="true"
	       />  
		   
		   
	<style name="skin_style" url="%SWFPATH%/skin/skin_v6_1.png"/>	    
		   
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
		  <action name="skin_scene_info">    
    if(preloading_title_close EQ 1,,
    if(%1==true,txtadd(currscenename,'',get(scene[get(xml.scene)].title)); set(layer[top_scene_name].html,get(currscenename)); stoptween(layer[top_scene_name].y); tween(layer[top_scene_name].y,80,1.5,easeOutQuint); stopdelayedcall(nametimer); delayedcall(nametimer,6, tween(layer[top_scene_name].y,-50,1.5,easeOutQuint); );,set(layer[top_scene_name].y,-50);); );  

  </action>
<action name="click_searchsceneXML">       

        js(click_searchscene());       
        set(layer[searchscene].visible,false);
       
    </action>
  <action name="click_searchsceneTopano">        
                                                        
        loadscene(%1,null,get(skin_settings.loadscene_flags),get(skin_settings.loadscene_blend));
    </action> 
  <action name="closeSceneName">    
    set(layer[top_scene_name].visible,false );
  </action>	     
  <action name="create_auto_thumbs">
		if (scene.count GT 1
        , 
        copy(thumb_size,settings[auto_thumbs].thumb_background_size); 
        copy(thumb_image_size, settings[auto_thumbs].thumb_size);
        copy(style[thumb_image].width, thumb_image_size);
        copy(style[thumb_image].height, thumb_image_size);
        copy(style[thumb_image].oy, thumb_size); 
        sub(style[thumb_image].oy, thumb_image_size);
        div(style[thumb_image].oy, 2);
        copy(style[thumb_image].ox,style[thumb_image].oy);
        copy(layer[thumbs_scrollarea].height, thumb_size); 
        copy(layer[albums_scrollarea].height,thumb_size);
        copy(layer[albums].height, thumb_size);
        copy(layer[new_thumbs].height, thumb_size); 
        copy(layer[new_thumbs].y,thumb_size); 
        add(thumb_width, thumb_size, settings[auto_thumbs].thumb_spacing); 
        set(album_index, 0);
        set(thumb_index, 0); 
         
        for(set(i,0), i LT scene.count, inc(i)
        , 
          <!-- txtadd(album_image_name,'album_image_',get(i));  -->
           if(scene[0].album, 
              
              if (scene[get(i)].album !== null
                , 
                txtadd(album_name,'album_',get(i));
                addlayer(get(album_name)); 
                layer[get(album_name)].loadstyle(album);
                set(layer[get(album_name)].parent, albums_scrollarea);
                set(layer[get(album_name)].album_index,get(album_index));
                mul(layer[get(album_name)].x, get(album_index),get(thumb_width)); 
                if(i==0, set(layer[get(album_name)].url,"%SWFPATH%/skin/group1.png"); );
				
				
				
				
                <!-- 缩略图 -->
                txtadd(album_thumburl,get(album_name),"_thumburl");
                addlayer(get(album_thumburl));
                layer[get(album_thumburl)].loadstyle(album_thumburl);
                set(layer[get(album_thumburl)].parent,get(album_name));
                set(layer[get(album_thumburl)].url,get(scene[get(i)].thumburl));
                <!-- 缩略图标题 -->
                txtadd(album_title_con,'album_title_con_',get(i)); 
                addlayer(get(album_title_con));
                layer[get(album_title_con)].loadstyle(thumb_image_title_container);
                set(layer[get(album_title_con)].parent, get(album_thumburl));
                set(layer[get(album_title_con)].y, 30);

                txtadd(album_title_word,'album_title_word_',get(i)); 
                addlayer(get(album_title_word));
                set(layer[get(album_title_word)].html, get(scene[get(i)].album));
                layer[get(album_title_word)].loadstyle(thumb_image_title_word);
                set(layer[get(album_title_word)].parent, get(album_title_con));

  
                add(layer[albums_scrollarea].width, get(thumb_width)); 
    
                txtadd(container_name,get(album_name), '_container'); 
                set(layer[get(album_thumburl)].container, get(container_name));
                inc(album_index); 

                <!-- txtadd(container_name, get(album_name),'_container'); -->
                addlayer(get(container_name));
                layer[get(container_name)].loadstyle(thumbs_container);
                <!-- set(layer[get(container_name)].style,thumbs_container); -->
                set(layer[get(container_name)].album,get(album_name)); 
                
                txtadd(scroll_sub_container,get(container_name),'_scroll');
                addlayer(get(scroll_sub_container));
        
               layer[get(scroll_sub_container)].loadstyle(sub_thumbs_container);
               if(device.flash,
                     set(layer[get(scroll_sub_container)].url,'%SWFPATH%/plugins/scrollarea.swf');
                     , 
                     set(layer[get(scroll_sub_container)].url,'%SWFPATH%/plugins/scrollarea.js');
                );
               
               set(layer[get(scroll_sub_container)].parent,get(container_name));
              
                set(thumb_index, 0);
              );
              create_thumb(); 
              set(layer[get(thumb_name)].parent, get(scroll_sub_container));
               add(layer[get(scroll_sub_container)].width, get(thumb_width)); 
              ,
               <!-- jscall(calc('console.log("krpano version: ")')); -->
              create_thumb();
              set(layer[get(thumb_name)].parent,albums_scrollarea); 
              add(layer[albums_scrollarea].width, get(thumb_width)); 
              ); <!--if 结束-->

        ); <!--for 结束-->

        trace(layer[albums].width);
        trace(layer[auto_thumbs].width); 
        trace(layer[auto_thumbs].pixelwidth);
        trace(layer[auto_thumbs].pixelheight); 

        );

       if(settings[auto_thumbs].onstart, settings[auto_thumbs].onstart(); );
    </action>
	
	<action name="skin_thumb_current">set(layer[current_thumb_%1].visible,true);</action>
    <action name="resize_auto_thumbs">
	copy(layer[auto_thumbs].width, area.pixelwidth);
        sub(layer[auto_thumbs].width,settings[auto_thumbs].left);
		sub(layer[auto_thumbs].width, settings[auto_thumbs].right);
		copy(layer[auto_thumbs].x, settings[auto_thumbs].left);
        copy(layer[auto_thumbs].y,settings[auto_thumbs].bottom); 
		copy(layer[albums].width, layer[auto_thumbs].width);
        sub(layer[albums].width,settings[auto_thumbs].albums_right); 
		add(layer[albums].width,settings[auto_thumbs].right);
    </action>
	 <action name="hide_thumbs">delayedcall(get(container), 0, hide_container(get(container)); );</action>
    <action name="hide_container">tween(layer[%1].alpha, 0, .25, easeOutQuad, set(layer[%1].visible, false));
        tween(layer[thumbs_left_shadow].alpha, 0, .1); tween(layer[thumbs_right_shadow].alpha, 0, .1);
    </action>
    <action name="fadeout_siblings">for(set(i, 0), i LT layer.count, inc(i), if(layer[get(i)].parent ==
        layer[get(%1)].parent, if(layer[get(i)].parent == albums_scrollarea, if(scene[0].album, tween_alpha(get(i), .6);
        , tween_alpha(get(i), .85); ); , tween_alpha(get(i), .85); ); ) ); tween_alpha(get(%1), 1);
    </action>
	
	 <action name="show_thumbs">
      
        stopdelayedcall(disable_thumbs);
       
        if(!last_parent,set(last_parent,'album_0'););
        set(layer[get(last_parent)].url,"%SWFPATH%/skin/bg2.png");
        if(container == last_show_sub_container AND layer[get(container)].state=='opened'
          ,
            set(layer[get(container)].state, 'closed');
            tween(layer[get(container)].y, -100, 0.5, easeOutQuint);
            <!-- set(layer[get(last_parent)].url,"%SWFPATH%/skin/group2.png"); -->
          ,
            if(layer[get(last_show_sub_container)].state=='opened',
             set(layer[get(last_show_sub_container)].state, 'closed');
             tween(layer[get(last_show_sub_container)].y, -100, 0.5, easeOutQuint);
             
            );
            if(layer[get(container)].state=='closed',
            set(layer[get(container)].state, 'opened');
            tween(layer[get(container)].y, 100.5, 0.5, easeOutQuint);
			<!--set(layer[skin_group].visible,true);
			set(layer[skin_group_container].visible, true);-->
            set(last_show_sub_container,get(container));
            set(last_parent,get(parent));
            set(layer[get(parent)].url,"%SWFPATH%/skin/bg1.png");
			
            );
          );

    </action>
	
	
   <action name="create_thumb">
      
	  txtadd(thumb_name,'thumb_', get(i)); 
		
      addlayer(get(thumb_name));
      layer[get(thumb_name)].loadstyle(thumb); 
	 <!--  set(layer[get(thumb_name)].parent, get(container_name)); -->
      copy(layer[get(thumb_name)].scene, scene[get(i)].name); 
	  copy(layer[get(thumb_name)].album, album_name);
      set(layer[get(thumb_name)].thumb_index, get(thumb_index)); 
  	  mul(layer[get(thumb_name)].x, get(thumb_index),get(thumb_width)); 
	  set(layer[get(thumb_name)].Title, get(scene[get(i)].title));
	  set(layer[get(thumb_name)].onhover,showtext(get(Title),skintext)); 

       <!-- jscall(calc('console.log(" '+thumb_name+' x : '+layer[get(thumb_name)].x+'")'));  -->
  		<!-- if(container_name, add(layer[get(container_name)].width, get(thumb_width)););  -->
  		<!-- copy(layer[get(thumb_name)].tooltip, scene[get(i)].title);
      copy(layer[get(thumb_name)].tooltip_oy,layer[get(album_name)].tooltip_oy); -->
		
      txtadd(thumb_image_name,'thumb_image_',get(i)); 
	  addlayer(get(thumb_image_name));
      set(layer[get(thumb_image_name)].url,get( scene[get(i)].thumburl));
      layer[get(thumb_image_name)].loadstyle(thumb_image);
	  set(layer[get(thumb_image_name)].parent, get(thumb_name));
		
		
		<!-- 缩略图标题 -->
		txtadd(thumb_image_title_con,'thumb_image_title_con_',get(i));
		addlayer(get(thumb_image_title_con));
        layer[get(thumb_image_title_con)].loadstyle(thumb_image_title_container);
		set(layer[get(thumb_image_title_con)].parent, get(thumb_image_name));
		txtadd(thumb_image_title_word,'thumb_image_title_word_',get(i)); 
		addlayer(get(thumb_image_title_word));
		set(layer[get(thumb_image_title_word)].html, get(scene[get(i)].title));
        layer[get(thumb_image_title_word)].loadstyle(thumb_image_title_word);
		set(layer[get(thumb_image_title_word)].parent, get(thumb_image_title_con));
	       
          inc(thumb_index); if(i == 0, copy(layer[auto_thumbs].active_album, album_name);
        copy(layer[auto_thumbs].active_thumb, thumb_name); );


      txtadd(current_thumb,'current_thumb_',get(i)); addlayer(get(current_thumb)); set(layer[get(current_thumb)].url,'%SWFPATH%/skin/pc-icon.png'); set(layer[get(current_thumb)].crop,'160|190|14|14'); set(layer[get(current_thumb)].keep,true); set(layer[get(current_thumb)].parent, get(thumb_name)); set(layer[get(current_thumb)].align, righttop); set(layer[get(current_thumb)].x,4); set(layer[get(current_thumb)].y,4); set(layer[get(current_thumb)].visible,false );
    </action>
    <action name="resize_auto_thumbs">copy(layer[auto_thumbs].width, area.pixelwidth);
        sub(layer[auto_thumbs].width,settings[auto_thumbs].left); sub(layer[auto_thumbs].width,
        settings[auto_thumbs].right); copy(layer[auto_thumbs].x, settings[auto_thumbs].left);
        copy(layer[auto_thumbs].y,settings[auto_thumbs].bottom); copy(layer[albums].width, layer[auto_thumbs].width);
        sub(layer[albums].width,settings[auto_thumbs].albums_right); add(layer[albums].width,
        settings[auto_thumbs].right);
    </action>
    <action name="show_thumbs">
      
        stopdelayedcall(disable_thumbs);
       
        if(!last_parent,set(last_parent,'album_0'););
        set(layer[get(last_parent)].url,"%SWFPATH%/skin/group2.png");
        if(container == last_show_sub_container AND layer[get(container)].state=='opened'
          ,
            set(layer[get(container)].state, 'closed');
            tween(layer[get(container)].y, -100, 0.5, easeOutQuint);
            <!-- set(layer[get(last_parent)].url,"%SWFPATH%/skin/group2.png"); -->
          ,
            if(layer[get(last_show_sub_container)].state=='opened',
             set(layer[get(last_show_sub_container)].state, 'closed');
             tween(layer[get(last_show_sub_container)].y, -100, 0.5, easeOutQuint);
             
            );
            if(layer[get(container)].state=='closed',
            set(layer[get(container)].state, 'opened');
            tween(layer[get(container)].y, 202, 0.5, easeOutQuint);
            set(last_show_sub_container,get(container));
            set(last_parent,get(parent));
            set(layer[get(parent)].url,"%SWFPATH%/skin/group1.png");
            );
          );

          <!-- set(layer[thumbs_background].visible, true);  -->
      <!--   if(
          show, 
          set(layer[thumbs_background].state, 'opened');
          tween(layer[thumbs_background].y, 97, 0.5, easeOutQuint);
          set(layer[thumbs_background].visible, true); 
          ,
          set(layer[thumbs_background].state, 'closed');
          tween(layer[thumbs_background].y, -102, 0.5, easeOutQuint,
          set(layer[thumbs_background].visible, false););
        ); 
 -->

      <!--   if (layer[albums].current_container,
          copy(layer[get(container)].zorder,layer[get(layer[albums].current_container)].zorder); 
        );
        inc(layer[get(container)].zorder); 
        set(layer[albums].current_album, get(name));
        set(layer[albums].current_container, get(container)); 
        set(layer[get(container)].visible, true);
        tween_alpha(get(container), 1, .25); 
        set(layer[new_thumbs].visible, true);
        set(layer[thumbs_scrollarea].width,get(layer[get(container)].width));
        if (device.pixelratio == 1,
          if(device.html5,mul(layer[thumbs_scrollarea].width, 2);); 
        );  -->
      <!--   move_thumbs();
        show_or_hide_shadows(); -->
    </action>
    <action name="hide_thumbs">delayedcall(get(container), 0, hide_container(get(container)); );</action>
    <action name="hide_container">tween(layer[%1].alpha, 0, .25, easeOutQuad, set(layer[%1].visible, false));
        tween(layer[thumbs_left_shadow].alpha, 0, .1); tween(layer[thumbs_right_shadow].alpha, 0, .1);
    </action>
    <action name="fadeout_siblings">for(set(i, 0), i LT layer.count, inc(i), if(layer[get(i)].parent ==
        layer[get(%1)].parent, if(layer[get(i)].parent == albums_scrollarea, if(scene[0].album, tween_alpha(get(i), .6);
        , tween_alpha(get(i), .85); ); , tween_alpha(get(i), .85); ); ) ); tween_alpha(get(%1), 1);
    </action>
  <action name="update_active_thumb">
  	if(scene.count GT 1 ,
		<!-- 自动获取当前场景名称 -->
		set(layer[show_current_scene_title].html,get(scene[get(xml.scene)].title));
         stoptween(layer[show_current_scene_title].y);
        tween(layer[show_current_scene_title].y,80,1.5,easeOutQuint);
        stopdelayedcall(nametimer);
        delayedcall(nametimer,6,
            tween(layer[show_current_scene_title].y,-50,1.5,easeOutQuint);
			
        );
		
		txtadd(active_thumb_name, 'thumb_', get(scene[get(xml.scene)].index));
  		set(layer[get(layer[auto_thumbs].active_thumb)].bgcolor,'0xffffff'); 
  		set(layer[get(layer[auto_thumbs].active_thumb)].bgalpha,1); 
  		
        copy(layer[auto_thumbs].active_thumb,active_thumb_name); 
  		
  		set(layer[get(layer[auto_thumbs].active_thumb)].bgcolor,'0xF6A600'); 
  		set(layer[get(layer[auto_thumbs].active_thumb)].bgalpha,1); 
  		
  		if(layer[get(layer[auto_thumbs].active_album)].as == album,
          	copy(layer[get(layer[auto_thumbs].active_album)].crop,album_crop); , 
  			if(layer[auto_thumbs].active_album,copy(layer[get(layer[auto_thumbs].active_album)].crop,thumb_crop)); ); 
  			copy(layer[auto_thumbs].active_album,layer[get(active_thumb_name)].album); 
  			if(layer[get(layer[auto_thumbs].active_album)].as == album,
          		copy(layer[get(layer[auto_thumbs].active_album)].crop,active_album_crop); , 
  				if(layer[auto_thumbs].active_album, copy(layer[get(layer[auto_thumbs].active_album)].crop,active_thumb_crop); ) 
  			);
       );
    </action>
   <action name="fadein_children">for(set(i, 0), i LT layer.count, inc(i), if(layer[get(i)].parent == %1,
        tween_alpha(get(i), 1); ) );
    </action>
    <action name="tween_alpha">tween(layer[%1].alpha, %2, .25);</action>
    <action name="move_thumbs">if(layer[albums].current_container, copy(thumbs_scrollarea_width,
        layer[thumbs_scrollarea].width); if (device.pixelratio == 1, if (device.html5, div(thumbs_scrollarea_width, 2);
        ); ); if (layer[new_thumbs].pixelwidth GE thumbs_scrollarea_width, mul(a,
        thumb_size,layer[get(layer[albums].current_album)].album_index); add(a, thumb_size); div(b, thumb_size, 2);
        div(c,layer[get(layer[albums].current_container)].width, 2); sub(result, a, b); sub(result, c);
        set(layer[get(layer[albums].current_container)].x, get(result));
        sub(layer[get(layer[albums].current_container)].x, get(layer[albums_scrollarea].loverflow));
        if(layer[get(layer[albums].current_container)].x GT 0,
        add(ox_plus_thumbs_width,layer[get(layer[albums].current_container)].x,
        layer[get(layer[albums].current_container)].width); if(ox_plus_thumbs_width GT layer[new_thumbs].pixelwidth,
        sub(dif, ox_plus_thumbs_width, layer[new_thumbs].pixelwidth); sub(layer[get(layer[albums].current_container)].x,
        dif); ); , set(layer[get(layer[albums].current_container)].x, 0); ); ,
        set(layer[get(layer[albums].current_container)].x,0); ); );
    </action>
    <action name="show_or_hide_shadows">if(layer[albums_scrollarea].loverflow GT 3,
        tween(layer[albums_left_shadow].alpha, 1, .1); , tween(layer[albums_left_shadow].alpha, 0, .1); );
        if(layer[albums_scrollarea].roverflow GT 3, tween(layer[albums_right_shadow].alpha, 1, .1); ,
        tween(layer[albums_right_shadow].alpha, 0, .1); ); if(layer[thumbs_scrollarea].loverflow GT 3,
        tween(layer[thumbs_left_shadow].alpha, 1, .1); , tween(layer[thumbs_left_shadow].alpha, 0, .1); );
        if(layer[thumbs_scrollarea].roverflow GT 3, tween(layer[thumbs_right_shadow].alpha, 1, .1); ,
        tween(layer[thumbs_right_shadow].alpha, 0, .1); );
    </action>
    <control mouse="drag" touch="drag" zoomtocursor="false" zoomoutcursor="false" draginertia="0.1" dragfriction="0.9"
             movetoaccelerate="1.0" movetospeed="10.0" movetofriction="0.8" keybaccelerate="0.09" keybfriction="0.94"
             keybfovchange="0.25" mousefovchange="1.0" fovspeed="3.0" keycodesin="16,65,107" keycodesout="17,89,90,109" fovfriction="0.9" bouncinglimits="true"/>
    <cursors standard="default" dragging="move" moving="move"/>
    <include url="%SWFPATH%/plugins/webvr.xml" devices="html5"/>
                         
     <plugin name="WebVR" keep="true" devices="html5" pluginurl="%SWFPATH%/plugins/webvr.js" url="%SWFPATH%/plugins/webvr.js"
            multireslock.desktop="true" multireslock.mobile.or.tablet="false" mobilevr_support="true"
            mobilevr_fake_support="true"
            onavailable="removelayer(webvr_enterbutton); skin_arrange_buttons(); webvr_onavailable();"
            onentervr="hotspot_enterVR();set(webvr_open,true);skin_showloading(false); webvr_onentervr(); webvr_setup(); skin_reloadscene_webvr();webvr_enterVR();js(toggleBtns(0));"
            onexitvr="hotspot_exitVR();set(webvr_open,false);webvr_onexitvr(); webvr_setup(); skin_reloadscene_webvr();js(toggleBtns(1)); "/> 
    <style name="webvr_button_style" border="false" roundedge="calc:1.0"
           backgroundcolor="get:skin_settings.design_bgcolor" backgroundalpha="get:skin_settings.design_bgalpha"
           shadow="0.01" shadowrange="10.0" shadowangle="90.0" shadowcolor="0x30261B" shadowalpha="0.50"
           css="calc:skin_settings.design_text_css + ' color:#FFFFFF;font-size:' + 20*webvr_setup_scale*webvr_button_scale + 'px;'"/>

 
    
    <layer name="webvr_rotate_to_landscape_request" keep="true" vr="true" devices="mobile" url="rotate_device.png"
           scale="0.5" align="top" edge="center" y="28%" autoalpha="true" alpha="0.0" enabled="false"/>
    <events name="webvr_events" keep="true" devices="html5" onresize.mobile="webvr_act_as_gyro_in_portrait_mode();"
            onviewchange=""/>
    <action name="webvr_setup">if(webvr.isenabled, copy(loadscene_flags_backup, skin_settings.loadscene_flags);
        set(skin_settings.loadscene_flags, MERGE|KEEPVIEW|KEEPMOVING|NOPREVIEW);
        webvr_act_as_gyro_in_portrait_mode(true); if(scene.count GT 1, set(hotspot[webvr_prev_scene].visible, true);set(hotspot[webvr_prev_home].visible, true);
        set(hotspot[webvr_next_scene].visible, true); set(events[webvr_events].onviewchange, webvr_menu_following()); );
        , if(loadscene_flags_backup !== null, copy(skin_settings.loadscene_flags, loadscene_flags_backup));
        tween(layer[webvr_rotate_to_landscape_request].alpha, 0.0, 0.0); set(hotspot[webvr_prev_scene].visible, false);
        set(hotspot[webvr_next_scene].visible, false); set(hotspot[webvr_prev_home].visible, false);set(events[webvr_events].onviewchange, null); );
    </action>
    <action name="webvr_act_as_gyro_in_portrait_mode">if(device.mobile AND webvr.isenabled, div(aspect, stagewidth,
        stageheight); if(aspect != lastaspect OR '%1' == 'true', copy(lastaspect, aspect); if(stagewidth GT stageheight,
        set(display.stereo, true); set(webvr.mobilevr_sensor_mode, 3); webvr.update();
        tween(layer[webvr_rotate_to_landscape_request].alpha, 0.0, 0.0); , set(display.stereo, false);
        set(webvr.mobilevr_sensor_mode, 1); webvr.update(); tween(layer[webvr_rotate_to_landscape_request].alpha, 1.0);
        delayedcall(3.0, tween(layer[webvr_rotate_to_landscape_request].alpha, 0.0, 1.0); ); ); ); , set(lastaspect, 0);
        );
    </action>

    


<action name="webvr_enterVR">      
    delayedcall(2.0,add_vr_thumbs(););
      
    </action>

       <action name="start_thumbs">
       set(start_ty, 10000);
     add(vr_juli,get(view.hlookat),20);
     if(%1 == "exit", 
         callwith(hotspot[vr_tishi_bg],tween(alpha|ty, 0|10000,2.5, easeInQuint|easeInQuint););
       callwith(hotspot[vr_tishi], tween(alpha|ty, 0|10000,2.5, easeInQuint|easeInQuint, set(enabled,false)););
      , 
       set(hotspot[vr_tishi_bg].ath,get(view.hlookat));
       set(hotspot[vr_tishi].ath,get(view.hlookat));
       callwith(hotspot[vr_tishi_bg], copy(ty,start_ty);tween(alpha|ty, 0.5|0 , 3, easeOutQuad|easeOutQuint););
       callwith(hotspot[vr_tishi], copy(ty,start_ty);tween(alpha|ty, 1.0|0 , 3, easeOutQuad|easeOutQuint, set(enabled,true)););
       vr_yc_thumbs_time(0);
     );
     for(set(i,0), i LT scene.count, inc(i), 
         set(vr_thumbs,get(scene[get(i)].name));
       txtadd(vr_thumbs_bg,get(vr_thumbs),'bg');
        if(%1 == "exit", 
           callwith(hotspot[get(vr_thumbs_bg)], tween(alpha|ty, 0|10000,2.5, easeInQuint|easeInQuint););
         callwith(hotspot[get(vr_thumbs)], tween(alpha|ty, 0|10000,2.5, easeInQuint|easeInQuint, set(enabled,false)););
         ,
         set(hotspot[get(vr_thumbs_bg)].ath,get(vr_juli));
         set(hotspot[get(vr_thumbs)].ath,get(vr_juli));
         callwith(hotspot[get(vr_thumbs_bg)], copy(ty,start_ty);tween(alpha|ty, 0.5|0 , 3,easeOutQuad|easeOutQuint););
         callwith(hotspot[get(vr_thumbs)], copy(ty,start_ty);tween(alpha|ty, 1.0|0 , 3,easeOutQuad|easeOutQuint, set(enabled,true)););
         add(vr_juli,20);
          );
        );
    </action>


      <action name="add_vr_thumbs">
         set(vr_hot_ath,0);
       set(vr_hot_atv,0);
       set(vr_ts,true);
       for(set(i,0), i LT scene.count, inc(i), 
          set(vr_thumbs,get(scene[get(i)].name));        
        if(vr_ts, set(vr_thumbs_bg,vr_tishi_bg);
           set(vr_thumbs,vr_tishi);
           set(vr_hot_url,'%SWFPATH%/skin/texts.png');
           set(vr_ts,false);
           sub(i,1);
           , 
           txtadd(vr_thumbs_bg,get(vr_thumbs),'bg');
           set(vr_hot_url,get(scene[get(vr_thumbs)].thumburl));
          );
        if((vr_hot_ath == 360) OR (vr_hot_ath == 720) OR (vr_hot_ath == 1080), 
           add(vr_hot_atv,15);
          );
        addhotspot(get(vr_thumbs_bg));
        hotspot[get(vr_thumbs_bg)].loadstyle(panel111);
        set(hotspot[get(vr_thumbs_bg)].ath,get(vr_hot_ath));
        set(hotspot[get(vr_thumbs_bg)].atv,get(vr_hot_atv));
        addhotspot(get(vr_thumbs));
        set(hotspot[get(vr_thumbs)].ath,get(vr_hot_ath));
        set(hotspot[get(vr_thumbs)].atv,get(vr_hot_atv));
        set(hotspot[get(vr_thumbs)].url,get(vr_hot_url));
        if((vr_hot_ath == vr_ts) AND (vr_hot_atv == 0), 
             set(hotspot[vr_tishi].crop,287|0|252|176);
           ,
           txtadd(hotspot[get(vr_thumbs)].onclick,"start_thumbs(exit);loadscene(",get(vr_thumbs),", null, NOPREVIEW|MERGE|KEEPMOVING, BLEND(1));"
           );
         );
        hotspot[get(vr_thumbs)].loadstyle(thumb111);
        add(vr_hot_ath,20);
        );
  </action>

<action protect="true" name="vr_yc_thumbs_time">
        set(vr_time,%1);
      add(vr_time,1);
      set(time_kz,true);
      if(vr_time == 15, delete(time_kz,vr_time);start_thumbs(exit););
      if(time_kz, delayedcall(1,vr_yc_thumbs_time(get(vr_time))););
  </action>


    <style name="webvr_menu_style" depth="800" scale="0.5" distorted="true" ath="0" atv="45" alpha="0.5"/>

  <style name="panel111" distorted="true" enabled="false" zorder="1" url="%SWFPATH%/skin/black.png" width="100" height="70" alpha="0" depth="700" ty="10000" keep="true" />
  <style name="thumb111" distorted="true" enabled="false" zorder="3" capture="false" alpha="0" depth="700" ty="10000" width="90" height="60" onover="tween(depth,500);" onout="tween(depth,700);" keep="true" />
    <hotspot name="webvr_prev_home"  keep="true"  style="skin_base|webvr_menu_style" crop="0|128|64|64" ox="0" onover="tween(scale,0.7);" onout="tween(scale,0.5);" vr_timeout="750" onclick="start_thumbs();"  visible="false" devices="html5.and.webgl"  />

    <hotspot name="webvr_prev_scene" keep="true" style="skin_base|webvr_menu_style" crop="0|64|64|64" ox="-64"
             onover="tween(scale,0.6);" onout="tween(scale,0.5);" vr_timeout="750" onclick="skin_nextscene_loop(-1);"
             visible="false" devices="html5.and.webgl"/>
    <hotspot name="webvr_next_scene" keep="true" style="skin_base|webvr_menu_style" crop="64|64|64|64" ox="+64"
             onover="tween(scale,0.6);" onout="tween(scale,0.5);" vr_timeout="750" onclick="skin_nextscene_loop(+1);"
             visible="false" devices="html5.and.webgl"/>
     



    <action name="webvr_menu_following" type="Javascript" devices="html5">
        <![CDATA[

                var hs1 = krpano.get("hotspot[webvr_prev_scene]");

                var hs2 = krpano.get("hotspot[webvr_next_scene]");
                var hs3 = krpano.get("hotspot[webvr_prev_home]");

                if(!hs1.hovering && !hs2.hovering && !hs3.hovering)

                {

                        var f = 0.01;   // following speed factor

                        var h = krpano.view.hlookat;

                        var v = krpano.view.vlookat;

                        var hsh = hs1.ath;

                        var hsv = hs1.atv;

                        h   = (h  -(h|0))   + (((h|0)  +360180)%360) - 180.0;

                        v   = (v  -(v|0))   + (((v|0)  +360180)%360) - 180.0;

                        hsh = (hsh-(hsh|0)) + (((hsh|0)+360180)%360) - 180.0;

                        var dh = h - hsh;

                        dh += (dh > 180) ? -360 : (dh < -180) ? 360 : 0

                        hsh += dh*f;

                        var a = Math.abs(v - hsv) / 90.0;

                        a = 1.0 * Math.max(1.0 - 2.0*Math.sqrt(a), 0);

                        v = v + 55.0 - v*1.5;

                        hsv = hsv*(1.0 - f) + v*f;

                        hs1.ath = hs2.ath = hs3.ath  = hsh;

                        hs1.atv = hs2.atv = hs3.atv  = hsv;

                        hs1.alpha = hs2.alpha  = hs3.alpha = a;

                }

        ]]>
    </action>
    <style name="skin_base" url="calc:vtourskinxmlpath.url + skin_settings.design_skin_images"/>
    <style name="skin_glow" ondown="copy(skin_lockglow,name); skin_buttonglow(get(name)); if(ondown2, ondown2() );"
           onover="if(skin_lockglow === null, copy(skin_lockglow,name); skin_buttonglow(get(name),0.3) ); if(onover2, onover2() );"
           onout="if(skin_lockglow === name AND !pressed, skin_buttonglow(null);delete(skin_lockglow); ); if(onout2, onout2() );"
           onup="if(onup2, onup2()); delayedcall(0, if(hovering AND enabled, skin_buttonglow(get(name),0.3); , skin_buttonglow(null);delete(skin_lockglow); ); );"/>
    <style name="skin_thumbtext_style" url="%SWFPATH%/plugins/textfield.swf" align="bottom" width="100%"
           autoheight="true" y="0" wordwrap="false" padding="5" enabled="false" background="true"
           backgroundcolor="0x000000" backgroundalpha="0.5" border="false"
           css="calc:skin_settings.design_text_css + ' text-align:center; font-size:10px;'"
           textshadow="get:skin_settings.design_text_shadow"/>
    <style name="skin_hotspotstyle" url="vtourskin_hotspot.png" scale="0.5" edge="top" distorted="true" tooltip=""
           onclick="if(linkedscene, set(enabled,false); skin_hidetooltips(); tween(depth|alpha|oy|rx, 4000|0.0|-50|-60, 0.5, default, loadscene(get(linkedscene),null,get(skin_settings.loadscene_flags),get(skin_settings.loadscene_blend)); skin_updatescroll(); ); );"
           onover="tween(scale,0.55);" onout="tween(scale,0.5);"
           onloaded="if(linkedscene AND skin_settings.tooltips_hotspots, copy(tooltip,scene[get(linkedscene)].title); loadstyle(skin_tooltips); );"/>
    <style name="skin_tooltips"
           onover.mouse="copy(layer[skin_tooltip].html, tooltip); set(layer[skin_tooltip].visible, true); tween(layer[skin_tooltip].alpha, 1.0, 0.1); asyncloop(hovering, copy(layer[skin_tooltip].x,mouse.stagex); copy(layer[skin_tooltip].y,mouse.stagey); );"
           onout.mouse="tween(layer[skin_tooltip].alpha, 0.0, 0.1, default, set(layer[skin_tooltip].visible,false), copy(layer[skin_tooltip].x,mouse.stagex); copy(layer[skin_tooltip].y,mouse.stagey); );"/>
    <layer name="skin_tooltip" keep="true" url="%SWFPATH%/plugins/textfield.swf" parent="STAGE" visible="false"
           alpha="0" enabled="false" align="lefttop" edge="bottom" oy="-2" width="200" autoheight="true"
           background="false" backgroundcolor="0xFFFFFF" backgroundalpha="1.0" border="false" bordercolor="0x000000"
           borderalpha="1.0" borderwidth="1.0" roundedge="0" shadow="0.0" shadowrange="4.0" shadowangle="45"
           shadowcolor="0x000000" shadowalpha="1.0" textshadow="get:skin_settings.design_text_shadow"
           textshadowrange="6.0" textshadowangle="90" textshadowcolor="0x000000" textshadowalpha="1.0"
           css="calc:skin_settings.design_text_css + ' text-align:center; font-size:16px;'" html=""/>
    <layer name="skin_layer" keep="true" type="container" align="top" width="get:skin_settings.layout_width"
           maxwidth="get:skin_settings.layout_maxwidth" height="100%" maskchildren="true" visible="false"
           bgcapture="false" zorder="1">
        <layer name="skin_loadingtext" url="%SWFPATH%/plugins/textfield.swf" align="center" x="5" y="-5"
               html="get:skin_settings.loadingtext" visible="false" autoheight="true" background="false" border="false"
               enabled="false"
               css="calc:skin_settings.design_text_css + ' text-align:center; font-style:italic; font-size:22px;'"
               textshadow="get:skin_settings.design_text_shadow"/>
    </layer>
    <plugin name="skin_gyro" keep="true" url="" html5_url="%SWFPATH%/plugins/gyro2.js" devices="html5" enabled="false"
            onavailable="js(showGyroBtn());" softstart="2"/>
	<layer name="show_current_scene_title" url="%SWFPATH%/plugins/textfield.swf" width="100%" keep="true" background="false"
	       css="color:#ffffff;font-size:18px;font-family:微软雅黑;text-align:center;"
	       enabled="false" y="50" html="" />			
    <events name="init_view_event" keep="true" onxmlcomplete=""/>
    <events name="skin_events" keep="true"
            onxmlcomplete="set(events[skin_events].onxmlcomplete,null); skin_startup();js(showPanoBtns(get(scene.count)));"
            onnewpano="skin_showloading(true); skin_update_scene_infos(); skin_deeplinking_update_url();"
            onremovepano="skin_showloading(true);" onloadcomplete="skin_showloading(false);"
            onidle="skin_deeplinking_update_url();" onresize="skin_onresize();"
            onenterfullscreen.fullscreensupport="set(layer[skin_btn_fs].crop, '64|576|64|64');"
            onexitfullscreen.fullscreensupport="set(layer[skin_btn_fs].crop, '0|576|64|64');"
            onkeydown="skin_keydown_event();" onnewscene="" onmouseup=""/>
   <layer name="Subtitle" url="%SWFPATH%/plugins/textfield.swf" width="100%" keep="true" background="false" bgcolor="0xaaaaaa" visible="false" enabled="false"  />	
   <action name="showAutoTourSubtitle">
        set(layer[Subtitle].visible,true);
	    set(layer[Subtitle].html,%1);
		set(layer[Subtitle].align,%3);
        set(layer[Subtitle].css,'text-align:center;color:%4; font-family:"Microsoft YaHei";font-size:%2;font-weight:normal;text-shadow:#000;');

     </action>
    <action name="init_gyro">
        if(skin_settings.gyro AND !device.desktop AND device.html5
          , 
         copy(plugin[skin_gyro].url,plugin[skin_gyro].html5_url);
         );
    </action>
    <action name="skin_startup">

        if(skin_settings.webvr AND device.html5 AND device.webgl
        ,
        copy(plugin[WebVR].url, plugin[WebVR].pluginurl); 
        js(showWebvrBtn()); 
        ); 

        if(skin_settings.littleplanetintro AND (device.webgl OR device.flash) ,
         
         js(littlePlaneOpen(get(xml.scene))); 
         ,
         init_gyro();
          set(events[init_view_event].onnewscene,'js(initViewSetting(get(xml.scene)));js(initCompassSetting(get(xml.scene),get(view.hlookat)));js(getComment(get(xml.scene)));js(initHotspotSetting(get(xml.scene)));');
        ); 
  
        set(layer[skin_layer].visible, true); 
    </action>

    <action name="skin_addmapspots">
      for(set(i,0), i LT scene.count, inc(i), 
      if(scene[get(i)].lat, 
        txtadd(spotname,'spot', get(i)); txtadd(spotclickevent, 'skin_hidetooltips(); activatespot(',get(spotname),'); 
        loadscene(',get(scene[get(i)].name), ',null,get(skin_settings.loadscene_flags),get(skin_settings.loadscene_blend));
        skin_updatescroll(); 
        delayedcall(0.5,skin_showmap(false));');
         copy(scene[get(i)].mapspotname, spotname);
        addspot(get(spotname), get(scene[get(i)].lat), get(scene[get(i)].lng), get(scene[get(i)].heading), false,
        get(spotclickevent), null); 
        if(skin_settings.tooltips_mapspots, 
          set(layer[skin_map].spot[get(spotname)].tooltip
          ,
           get(scene[get(i)].title));
          txtadd(layer[skin_map].spot[get(spotname)].onover, 'set(hovering,true);',get(style[skin_tooltips].onover) ); 
           txtadd(layer[skin_map].spot[get(spotname)].onout, 'set(hovering,false);',get(style[skin_tooltips].onout) ); 
          );
         ); 
         );
        if(xml.scene != null, activatespot(get(scene[get(xml.scene)].mapspotname) ); , activatespot(spot0); ); 
        zoomToSpotsExtent();
    </action>
    <action name="skin_setup_littleplanetintro">
      copy(lp_scene, xml.scene);
      copy(lp_hlookat, view.hlookat);
      copy(lp_vlookat, view.vlookat);
      copy(lp_fov, view.fov); copy(lp_fovmax, view.fovmax); 
      copy(lp_limitview,view.limitview); 
      set(view.fovmax, 170); 
      set(view.limitview, lookto); 
      set(view.vlookatmin, 90);
      set(view.vlookatmax, 90); 
      lookat(calc(lp_hlookat - 180), 90, 150, 1, 0, 0);
      set(
        events[lp_events].onloadcomplete, 
        delayedcall(
        0.5, 
        if(
        lp_scene === xml.scene, 
        set(control.usercontrol, off);
        copy(view.limitview, lp_limitview); 
        set(view.vlookatmin, null);
        set(view.vlookatmax, null);
        tween(view.hlookat|view.vlookat|view.fov|view.distortion,
          calc('' + lp_hlookat + '|' + lp_vlookat + '|' + lp_fov + '|' + 0.0), 3.0, easeOutQuad, set(control.usercontrol, all);
          tween(view.fovmax, get(lp_fovmax));
          set(view.fovmin,%1);
          set(view.vlookatmin,%2); 
          set(view.vlookatmax,%3); 
          set(autorotate.horizon,%4);
          js(getComment(get(xml.scene))); 
          js(initHotspotSetting(get(xml.scene)));
          set(events[init_view_event].onloadcomplete,'js(initViewSetting(get(xml.scene)));js(initCompassSetting(get(xml.scene),get(view.hlookat)));js(getComment(get(xml.scene)));
          js(initHotspotSetting(get(xml.scene)));');
        );
        delayedcall(3,init_gyro(););
        ); 
        ); 
      );
    </action> 
 
    
    <action name="set_hotspot_visible">
      for(set(i,0),i LT hotspot.count,inc(i),
         if(%1 == false,
          if(hotspot[get(i)].visible == true,
            set(hotspot[get(i)].mark,true);set(hotspot[get(i)].visible,%1);
            );
          ,
          if(hotspot[get(i)].mark == true,
            set(hotspot[get(i)].visible,%1);
            );
          );
        
      );
    </action>
    <action name="skin_onresize">mul(mh, area.pixelheight, -1); if(layer[skin_thumbs].state == 'opened',
        add(mh,layer[skin_thumbs].height); set(layer[skin_scroll_layer].y, 97); , set(layer[skin_scroll_layer].y,
        get(mh)); ); if(layer[skin_map].state == 'opened', sub(hh,area.pixelheight,skin_settings.controlbar_offset);
        sub(hh,layer[skin_control_bar].height); sub(hh,32); add(mh,hh); add(mh,skin_settings.controlbar_overlap);
        sub(mh, layer[skin_scroll_layer].y_offset); copy(layer[skin_map].height, hh); ); add(mh,
        layer[skin_scroll_layer].y_offset); skin_video_updateseekbarwidth(); skin_arrange_buttons();
    </action>
    <action name="skin_arrange_buttons">calc(show_selbuttons, scene.count GT 1); calc(show_thumbutton,
        skin_settings.thumbs == true); calc(show_mapbutton, skin_settings.maps == true); calc(show_gyrobutton,
        plugin[skin_gyro].available == true AND view.vlookatrange == 180 ); calc(show_vrbutton, webvr.isavailable ==
        true); calc(show_fsbutton, device.fullscreensupport == true); set(lpos,6); set(cpos,0); if(show_gyrobutton,
        dec(cpos,20)); if(show_vrbutton, dec(cpos,24)); set(rpos,6); calc(show_dirbuttons, !device.mobile AND
        ((area.pixelwidth + 2*cpos) GT 520)); copy(layer[skin_btn_navi].visible, show_dirbuttons);
        copy(layer[skin_btn_prev].visible, show_selbuttons); copy(layer[skin_btn_next].visible, show_selbuttons);
        if(show_selbuttons, inc(lpos,44); inc(rpos,44); ); copy(layer[skin_btn_thumbs].visible, show_thumbutton);
        copy(layer[skin_btn_thumbs].x, lpos); if(show_thumbutton, inc(lpos,40)); copy(layer[skin_btn_map].visible,
        show_mapbutton); copy(layer[skin_btn_map].x, lpos); if(show_mapbutton, inc(lpos,40)); if(show_dirbuttons,
        copy(layer[skin_btn_navi].x, cpos); inc(cpos,140); set(layer[skin_btn_gyro].align, center);
        copy(layer[skin_btn_gyro].visible, show_gyrobutton); copy(layer[skin_btn_gyro].x, cpos); if(show_gyrobutton,
        inc(cpos,48)); set(layer[skin_btn_vr].align, center); copy(layer[skin_btn_vr].visible, show_vrbutton);
        copy(layer[skin_btn_vr].x, cpos); if(show_vrbutton, inc(cpos,80)); , set(layer[skin_btn_gyro].align, left);
        copy(layer[skin_btn_gyro].visible, show_gyrobutton); copy(layer[skin_btn_gyro].x, lpos); if(show_gyrobutton,
        inc(lpos,40)); set(layer[skin_btn_vr].align, left); copy(layer[skin_btn_vr].visible, show_vrbutton);
        copy(layer[skin_btn_vr].x, lpos); if(show_vrbutton, inc(lpos,80)); ); copy(layer[skin_btn_hide].x, rpos);
        inc(rpos,40); copy(layer[skin_btn_fs].visible, show_fsbutton); copy(layer[skin_btn_fs].x, rpos);
        if(show_fsbutton, inc(rpos,40));
    </action>
    <action name="skin_updatescroll">if(layer[skin_thumbs].loaded, set(cursceneindex, 0); if(xml.scene,
        copy(cursceneindex, scene[get(xml.scene)].index));
        layer[skin_thumbs].setcenter(get(scene[get(cursceneindex)].thumbx), get(scene[get(cursceneindex)].thumby)); );
    </action>
    <action name="skin_updatethumbscroll">copy(padding,skin_settings.thumbs_padding);
        if(skin_settings.thumbs_scrollbuttons, if(loverflow GT 0, set(layer[skin_thumbs_scrollleft].visible,true),
        set(layer[skin_thumbs_scrollleft].visible,false) ); if(roverflow GT 0,
        set(layer[skin_thumbs_scrollright].visible,true), set(layer[skin_thumbs_scrollright].visible,false) ); );
        if(skin_settings.thumbs_scrollindicator, if(woverflow GT 0,
        set(layer[skin_thumbs_scrollindicator].visible,true); sub(iw,pixelwidth,woverflow); div(pw,iw,pixelwidth);
        div(px,loverflow,woverflow); mul(pw,iw); copy(layer[skin_thumbs_scrollindicator].width,pw); sub(iw,pw);
        sub(iw,padding); sub(iw,padding); mul(px,iw); add(px,padding); copy(layer[skin_thumbs_scrollindicator].x,px); ,
        set(layer[skin_thumbs_scrollindicator].visible,false); ); );
    </action>
    <action name="skin_update_scene_infos">if(xml.scene !== null AND scene[get(xml.scene)].index GE 0,
        if(skin_settings.title, if(title, txtadd(layer[skin_title].html, get(title), ' - ',
        get(scene[get(xml.scene)].title) ); , copy(layer[skin_title].html, scene[get(xml.scene)].title ); );
        delayedcall(0.1, set(layer[skin_title].visible,true) ); ); if(skin_settings.thumbs_loop == false,
        if(scene[get(xml.scene)].index GT 0, set(layer[skin_btn_prev].enabled, true); set(layer[skin_btn_prev].alpha,
        1.0); , set(layer[skin_btn_prev].enabled, false); set(layer[skin_btn_prev].alpha, 0.3); ); sub(lastsceneindex,
        scene.count, 1); if(scene[get(xml.scene)].index LT lastsceneindex, set(layer[skin_btn_next].enabled, true);
        set(layer[skin_btn_next].alpha, 1.0); , set(layer[skin_btn_next].enabled, false);
        set(layer[skin_btn_next].alpha, 0.3); ); , if(scene.count GT 1, set(layer[skin_btn_prev].enabled, true);
        set(layer[skin_btn_prev].alpha, 1.0); set(layer[skin_btn_next].enabled, true); set(layer[skin_btn_next].alpha,
        1.0); , set(layer[skin_btn_prev].enabled, false); set(layer[skin_btn_prev].alpha, 0.3);
        set(layer[skin_btn_next].enabled, false); set(layer[skin_btn_next].alpha, 0.3); ); ); if(scene.count GT 1,
        set(layer[skin_btn_prev_fs].visible, true); set(layer[skin_btn_next_fs].visible, true); ,
        set(layer[skin_btn_prev_fs].visible, false); set(layer[skin_btn_next_fs].visible, false); ); txtadd(parentname,
        'skin_thumb_', get(scene[get(xml.scene)].index)); if(layer[get(parentname)], set(layer[skin_thumbborder].parent,
        get(parentname)); set(layer[skin_thumbborder].visible, true); , set(layer[skin_thumbborder].visible, false); );
        if(scene[get(xml.scene)].mapspotname, layer[skin_map].activatespot(get(scene[get(xml.scene)].mapspotname));
        layer[skin_map].pantospot(get(scene[get(xml.scene)].mapspotname)); ); if(plugin[skin_gyro].isavailable == true
        AND view.vlookatrange == 180, set(layer[skin_btn_gyro].visible, true); , set(layer[skin_btn_gyro].visible,
        false) ); if(view.vlookatrange LT 180, if(backup_control_bouncinglimits === null,
        copy(backup_control_bouncinglimits, control.bouncinglimits); ); set(control.bouncinglimits, false); ,
        if(backup_control_bouncinglimits !== null, copy(control.bouncinglimits, backup_control_bouncinglimits); ); );
        if(scene[get(xml.scene)].isvideopano AND plugin[video] !== null, skin_video_addcontrols(); ,
        skin_video_removecontrols(); ); );
    </action>
    <action name="skin_gotoscene">if(scene[%1], copy(cursceneindex, scene[get(xml.scene)].index); copy(newsceneindex,
        scene[%1].index); txtadd(layer[skin_thumbborder].parent, 'skin_thumb_', get(newsceneindex));
        layer[skin_thumbs].scrolltocenter(get(scene[get(newsceneindex)].thumbx), get(scene[get(newsceneindex)].thumby));
        loadscene(get(scene[get(newsceneindex)].name),null,get(skin_settings.loadscene_flags),calc(newsceneindex LT
        cursceneindex ? skin_settings.loadscene_blend_prev : (newsceneindex GT cursceneindex ?
        skin_settings.loadscene_blend_next : skin_settings.loadscene_blend))); );
    </action>
    <action name="skin_nextscene">add(newsceneindex, scene[get(xml.scene)].index, %1); if(newsceneindex GE 0 AND
        newsceneindex LT scene.count, txtadd(layer[skin_thumbborder].parent, 'skin_thumb_', get(newsceneindex));
        layer[skin_thumbs].scrolltocenter(get(scene[get(newsceneindex)].thumbx), get(scene[get(newsceneindex)].thumby));
        loadscene(get(scene[get(newsceneindex)].name),null,get(skin_settings.loadscene_flags),calc(%1 LT 0 ?
        skin_settings.loadscene_blend_prev : skin_settings.loadscene_blend_next)); );
    </action>
    <action name="skin_nextscene_loop">add(newsceneindex, scene[get(xml.scene)].index, %1); sub(lastsceneindex,
        scene.count, 1); if(newsceneindex LT 0, copy(newsceneindex,lastsceneindex)); if(newsceneindex GT lastsceneindex,
        set(newsceneindex,0)); layer[skin_thumbs].scrolltocenter(get(scene[get(newsceneindex)].thumbx),
        get(scene[get(newsceneindex)].thumby));
        loadscene(get(scene[get(newsceneindex)].name),null,get(skin_settings.loadscene_flags),calc(%1 LT 0 ?
        skin_settings.loadscene_blend_prev : skin_settings.loadscene_blend_next));
    </action>
    <action name="skin_showloading">
	                                                                                                                                         
    </action>
    <action name="skin_hidetooltips">set(layer[skin_tooltip].alpha,0.0); set(layer[skin_tooltip].visible,false);
    </action>
    <action name="skin_buttonglow">if('%1' !== 'null', set(strength,0.7); if(%2 != null, set(strength,%2));
        set(layer[skin_buttonglow].parent, %1); set(layer[skin_buttonglow].visible, true);
        tween(layer[skin_buttonglow].alpha, get(strength), 0.07); , tween(layer[skin_buttonglow].alpha, 0.0, 0.1,
        default, set(layer[skin_buttonglow].parent, null); set(layer[skin_buttonglow].visible, false); ); );
    </action>
    <action name="skin_calc_opened_closed">set(layer[get(name)].y_opened, get(layer[get(name)].y));
        set(layer[get(name)].y_closed, calc(layer[get(name)].y - skin_settings.controlbar_offset -
        skin_settings.controlbar_height + skin_settings.controlbar_offset_closed));
    </action>
    <action name="skin_hideskin">if(layer[skin_map].state != 'closed', skin_showmap(false); wait(0.40); );
        if(layer[skin_thumbs].state != 'closed', skin_showthumbs(false); wait(0.25); ); set(hidetime, calc('%1' ==
        'instant' ? 0.0 : 0.5)); tween(layer[skin_scroll_window].y, get(layer[skin_scroll_window ].y_closed),
        get(hidetime)); tween(layer[skin_splitter_bottom].y, get(layer[skin_splitter_bottom].y_closed), get(hidetime));
        tween(layer[skin_control_bar].y, get(layer[skin_control_bar ].y_closed), get(hidetime));
        tween(layer[skin_btn_prev_fs].x, 0, get(hidetime)); tween(layer[skin_btn_next_fs].x, 0, get(hidetime));
        if(layer[skin_logo], tween(layer[skin_logo].alpha, 0.0, 0.5, default, set(layer[skin_logo].visible,false)); );
        stopdelayedcall(skin_btn_show_alpha); set(layer[skin_btn_show].visible, true); delayedcall(skin_btn_show_alpha,
        get(hidetime), tween(layer[skin_btn_show].alpha, 0.25, 0.25); );
    </action>
    <action name="skin_showskin">tween(layer[skin_scroll_window ].y, get(layer[skin_scroll_window ].y_opened));
        tween(layer[skin_splitter_bottom].y, get(layer[skin_splitter_bottom].y_opened)); tween(layer[skin_control_bar
        ].y, get(layer[skin_control_bar ].y_opened)); tween(layer[skin_btn_prev_fs].x, -50);
        tween(layer[skin_btn_next_fs].x, -50); if(layer[skin_logo], set(layer[skin_logo].visible,true);
        tween(layer[skin_logo].alpha, 1.0); ); stopdelayedcall(skin_btn_show_alpha); set(layer[skin_btn_show].visible,
        false); delayedcall(skin_btn_show_alpha, 0.25, tween(layer[skin_btn_show].alpha, 0.0, 0.0); );
    </action>
   <action name="skin_showthumbs">
      if(!webvr_open, 
        if(%1 == null, 
          if(layer[thumbs_background].state == 'closed',
            set(show,true), 
            set(show,false)
            ); 
            , 
            set(show,%1);
          ); 
          if(
            show, 
            set(layer[thumbs_background].state, 'opened');
            tween(layer[thumbs_background].y, 97, 0.5, easeOutQuint);
            set(layer[thumbs_background].visible, true);
            
            if(scene[0].album,
              if(!last_show_sub_container,
                set(last_show_sub_container,"album_0_container");
              );
              set(layer[get(last_show_sub_container)].state, 'opened');
              tween(layer[get(last_show_sub_container)].y, 202, 0.5, easeOutQuint);
            );
            ,
            set(layer[thumbs_background].state, 'closed');
            tween(layer[thumbs_background].y, -100, 0.5, easeOutQuint,
            set(layer[thumbs_background].visible, false););
            
            if(last_show_sub_container,
             set(layer[get(last_show_sub_container)].state, 'closed');
             tween(layer[get(last_show_sub_container)].y, -122, 0.5, easeOutQuint);
            );
           

          ); 
        );
    </action>

    <action name="skin_showmap">
	if(%1 == null, 
	if(layer[skin_map].state == 'closed', set(show,true), set(show,false)); 
	,
        set(show,%1); ); 
		mul(mh, layer[skin_scroll_layer].pixelheight, -1);
		if(show,
        tween(layer[skin_thumbs_container].alpha, 0.0, 0.25, default, set(layer[skin_thumbs_container].visible,false));
        set(layer[skin_map].visible, true); 
		tween(layer[skin_map].alpha, 1.0, 0.25); 
		set(layer[skin_map].state,
        'opened'); 
		sub(hh,area.pixelheight,skin_settings.controlbar_offset);
		sub(hh,layer[skin_control_bar].height);
        sub(hh,32); add(mh,hh); sub(hh,skin_settings.controlbar_overlap);
		copy(layer[skin_map].height, hh);
        tween(layer[skin_scroll_layer].y, get(mh), 0.5, easeOutQuint); , if(layer[skin_map].state != 'closed',
        set(layer[skin_map].state, 'closed'); add(mh, layer[skin_scroll_layer].y_offset); tween(layer[skin_map].alpha,
        0.0, 0.5, easeOutQuint); tween(layer[skin_scroll_layer].y, get(mh), 0.5, easeOutQuint,
        set(layer[skin_map].visible,false) ); ); );
    </action>
    <action name="skin_keydown_event">if(keycode == 33, skin_nextscene_loop(-1) ); if(keycode == 34,
        skin_nextscene_loop(+1) ); if(keycode == 35, skin_gotoscene(calc(scene.count-1)) ); if(keycode == 36,
        skin_gotoscene(0) );
    </action>
    <action name="skin_deeplinking_update_url">
	</action>
    <action name="skin_reloadscene_webvr">delayedcall(0.1, if(scene[get(xml.scene)].havevrimage,
        loadscene(get(xml.scene), null, MERGE|KEEPVIEW|KEEPMOVING|KEEPPLUGIN|NOPREVIEW, BLEND(0.5)); ); );
    </action>
    <action name="skin_video_addcontrols">set(events[skin_events].onclick, skin_video_clickevent() );
        set(plugin[video].onvideoready, skin_video_updatestate() ); set(plugin[video].onvideoplay,
        skin_video_updatestate() ); set(plugin[video].onvideopaused, skin_video_updatestate() );
        set(plugin[video].onvideocomplete, skin_video_updatestate() ); if(plugin[video].ispaused AND
        plugin[video].pausedonstart, set(layer[skin_video_playpause].state, 'visible');
        set(layer[skin_video_playpause].enabled, true); tween(layer[skin_video_playpause].alpha, 1.0); );
        delayedcall(skin_video_delayedvisible, 0.25, set(layer[skin_video_controls].visible, true) );
        skin_video_updateseekbarwidth(); set(layer[skin_video_seekpos].x,0); set(layer[skin_video_loadbar].width,0);
        setinterval(skin_video_seek_updates, 0.5, skin_video_updatetime() );
    </action>
    <action name="skin_video_removecontrols">stopdelayedcall(skin_video_delayedvisible);
        set(events[skin_events].onclick, null); set(layer[skin_video_playpause].alpha, 0.0);
        set(layer[skin_video_controls].visible, false); clearinterval(skin_video_seek_updates);
    </action>
    <action name="skin_video_updatetime">copy(t1, plugin[video].time); copy(t2, plugin[video].totaltime); if(%1 !==
        null, calc(t1, %1 * t2); ); div(t1_min, t1, 60); mod(t1_sec, t1, 60); Math.floor(t1_min); Math.floor(t1_sec);
        div(t2_min, t2, 60); mod(t2_sec, t2, 60); Math.floor(t2_min); Math.floor(t2_sec);
        calc(layer[skin_video_time].html, t1_min + ':' + (t1_sec LT 10 ? '0' : '') + t1_sec + ' / ' + t2_min + ':' +
        (t2_sec LT 10 ? '0' : '') + t2_sec); calc(layer[skin_video_seekpos].x, (t1 / t2 * 100) + '%');
        calc(layer[skin_video_loadbar].width, (plugin[video].loadedbytes / plugin[video].totalbytes * 100) + '%');
    </action>
    <action name="skin_video_updateseekbarwidth">if(skin_settings.title, calc(layer[skin_video_seekbar_container].width,
        0 - (32 + layer[skin_title].pixelwidth + layer[skin_video_time].pixelwidth));
        calc(layer[skin_video_seekbar_container].x, layer[skin_title].pixelwidth + 16); ,
        calc(layer[skin_video_seekbar_container].width, 0 - (24 + layer[skin_video_time].pixelwidth));
        set(layer[skin_video_seekbar_container].x, 8); );
    </action>
    <action name="skin_video_ondownseeking">asyncloop(pressed, screentolayer(skin_video_seekbar,
        mouse.stagex,mouse.stagey, lx,ly); calc(seekpos, lx / layer[skin_video_seekbar].pixelwidth); clamp(seekpos, 0.0,
        1.0); skin_video_updatetime(seekpos); , plugin[video].seek(calc((seekpos * 100) + '%')); );
    </action>
    <layer name="skin_video_playpause" keep="true" style="skin_base|skin_glow" crop="0|640|64|64" scale="0.75"
           align="center" alpha="0.0" autoalpha="true" state="hidden" onclick="skin_video_playpause_click();"/>
    <action name="skin_video_updatestate">calc(layer[skin_video_playpause].crop, plugin[video].ispaused ? '0|640|64|64'
        : '64|640|64|64'); if(plugin[video].iscomplete, set(layer[skin_video_playpause].state, 'visible');
        tween(layer[skin_video_playpause].alpha, 1.0); );
    </action>
    <action name="skin_video_playpause_click">if(plugin[video].ispaused, plugin[video].play();
        set(layer[skin_video_playpause].state, 'hidden'); tween(layer[skin_video_playpause].alpha, 0.0); ,
        plugin[video].pause(); set(layer[skin_video_playpause].state, 'visible');
        tween(layer[skin_video_playpause].alpha, 1.0); delayedcall(autohide_pp, 2.0,
        set(layer[skin_video_playpause].state,'hidden'); tween(layer[skin_video_playpause].alpha, 0.0); ); );
    </action>
    <action name="skin_video_clickevent">stopdelayedcall(autohide_pp); switch(layer[skin_video_playpause].state,
        'visible', 'hidden'); if(layer[skin_video_playpause].state == 'hidden', tween(layer[skin_video_playpause].alpha,
        0.0); , tween(layer[skin_video_playpause].alpha, 1.0); delayedcall(autohide_pp, 2.0,
        set(layer[skin_video_playpause].state,'hidden'); tween(layer[skin_video_playpause].alpha, 0.0); ); );
    </action>
<contextmenu fullscreen="false" versioninfo="false">
        <item name="cc" caption="更改控制模式" onclick="skin_changecontrolmode();" separator="true"/>
        <item name="nv" caption="正常视角" onclick="skin_view_normal();" showif="view.vlookatrange == 180"
              separator="true"/>
        <item name="sv" caption="立体视角" onclick="skin_view_stereographic();" showif="view.vlookatrange == 180"
              devices="flash|webgl"/>
        <item name="pv" caption="帕尼尼视角" onclick="skin_view_pannini();" showif="view.vlookatrange == 180"
              devices="flash|webgl"/>
		<item name="vb" caption="水晶球视角" onclick="skin_view_ball();" showif="view.vlookatrange == 180"
              devices="flash|webgl"/>
	            <item name="lp" caption="小行星视角" onclick="skin_view_littleplanet();" showif="view.vlookatrange == 180"
              devices="flash|webgl"/>
    </contextmenu>
    <action name="skin_changecontrolmode">switch(control.touch, moveto, drag); switch(control.mouse, moveto, drag);
    </action>
    <action name="skin_view_look_straight">if(view.vlookat LT -80 OR view.vlookat GT +80, tween(view.vlookat, 0.0, 1.0,
        easeInOutSine); tween(view.fov, 100, distance(150,0.8)); );
    </action>
    <action name="skin_view_normal">
	set(view.fovmax, 140);
		tween(view.distortionfovlink,   0.5, distance(1.0,0.5));
	skin_view_look_straight(); tween(view.architectural, 0.0, distance(1.0,0.5));
        tween(view.pannini, 0.0, distance(1.0,0.5)); tween(view.distortion, 0.0, distance(1.0,0.5));
    </action>
    <action name="skin_view_fisheye">skin_view_look_straight(); tween(view.architectural, 0.0, distance(1.0,0.5));
        tween(view.pannini, 0.0, distance(1.0,0.5)); tween(view.distortion, 0.35, distance(1.0,0.5));
    </action>
    <action name="skin_view_architectural">skin_view_look_straight(); tween(view.architectural, 1.0, distance(1.0,0.5));
        tween(view.pannini, 0.0, distance(1.0,0.5)); tween(view.distortion, 0.0, distance(1.0,0.5));
    </action>
    <action name="skin_view_stereographic">skin_view_look_straight(); tween(view.architectural, 0.0, distance(1.0,0.5));
        tween(view.pannini, 0.0, distance(1.0,0.5)); tween(view.distortion, 1.0, distance(1.0,0.8));
    </action>
    <action name="skin_view_pannini">skin_view_look_straight(); tween(view.architectural, 0.0, distance(1.0,0.5));
        tween(view.pannini, 1.0, distance(1.0,0.8)); if(view.distortion LT 0.1, tween(view.distortion, 1.0,
        distance(1.0,0.8)); );
    </action>
    <action name="skin_view_littleplanet">
	set(view.stereographic, true);
		set(view.fovmax, 160);
		tween(view.distortionfovlink,   0.5, distance(1.0,0.5));
		tween(view.architectural, 0.0, distance(1.0,0.5));
		tween(view.pannini,       0.0, distance(1.0,0.5));
		tween(view.distortion,    1.0, distance(1.0,0.8));
		tween(view.fov,           150, distance(150,0.8));
		tween(view.vlookat,        90, distance(100,0.8));
		add(new_hlookat, view.hlookat, 123.0);
		tween(view.hlookat, get(new_hlookat), distance(100,0.8));
    </action>
	<action name="skin_view_ball">
                                   
	tween(view.architectural, 0.0,  distance(1.0,0.5));
	tween(view.pannini,       0.0,  distance(1.0,0.5));
                                                                                      
	tween(view.distortion,    2.8, distance(1.0,0.5),easeOutQuad,
    skin_view_look_straight();
    set(view_type_changing,false);
    if(multi_view_type !== null,
      delayedcall(0.1,change_multi_view(multi_view_type));
    );
  );
</action>
<action name="skin_view_architectural">
	skin_view_look_straight();
	tween(view.architectural, 1.0, distance(1.0,0.5));
	tween(view.pannini,       0.0, distance(1.0,0.5));
	tween(view.distortion,    0.0, distance(1.0,0.5));
</action>
<action name="skin_view_stereographic">
	skin_view_look_straight();
	tween(view.architectural, 0.0, distance(1.0,0.5));
	tween(view.pannini,       0.0, distance(1.0,0.5));
	tween(view.distortion,    1.0, distance(1.0,0.8));
</action>
    <plugin name="soundinterface" url="%SWFPATH%/plugins/soundinterface.swf"
            alturl="%SWFPATH%/plugins/soundinterface.js" rootpath="" preload="true" keep="true"/>

    <action name="draghotspot">spheretoscreen(ath, atv, hotspotcenterx, hotspotcentery, 'l'); sub(drag_adjustx,
        mouse.stagex, hotspotcenterx); sub(drag_adjusty, mouse.stagey, hotspotcentery); asyncloop(pressed, sub(dx,
        mouse.stagex, drag_adjustx); sub(dy, mouse.stagey, drag_adjusty); screentosphere(dx, dy, ath, atv); );
    </action>
    <layer name="tour_guide_alert" url="" keep="true" align="center" edge="center" x="0" y="0" maxwidth="100%"
           maxheight="100%" enabled="false" visible="false"/>
    <action name="show_tour_guide_alert">set(layer[tour_guide_alert].url,%1); set(layer[tour_guide_alert].visible,true);
        set(layer[tour_guide_alert].alpha,1); delayedcall(4, tween(layer[tour_guide_alert].alpha,0,1));
    </action>
   
    
  <action name="addEffect">
      if(plugin[snow] === null,
        addplugin(snow);
        if(device.html5,set(plugin[snow].url,'%SWFPATH%/plugins/snow.js');,set(plugin[snow].url,'%SWFPATH%/plugins/snow.swf');)
        set(plugin[snow].floor,0.7); 
        set(plugin[snow].zorder,1);
        set(plugin[snow].keep,false); 
        ); 
        if('%1' == 'defaultsnow', defaultsnow());
        if('%1' == 'snowballs', snowballs());
        if('%1' == 'snowflakes', snowflakes());
        if('%1' == 'silverstars', silverstars()); 
        if('%1' == 'goldenstars', goldenstars()); 
        if('%1' == 'hearts', hearts()); 
        if('%1' == 'smileys', smileys());
        if('%1' == 'money', money());
        if('%1' == 'rain', rain());
        if('%1' == 'midrain', midrain());
        if('%1' == 'heavyrain', heavyrain()); 
        if('%1' =='custom', customeffect(%2));
    </action>
    <action name="defaultsnow">set(plugin[snow].mode, snow); set(plugin[snow].blendmode, normal);
        set(plugin[snow].flakes, 4000); set(plugin[snow].color, 0xFFFFFF); set(plugin[snow].speed, 1.0);
        set(plugin[snow].shake, 4.0); set(plugin[snow].speedvariance, 2.0); set(plugin[snow].spreading, 4.0);
        set(plugin[snow].wind, 0.0);
    </action>
    <action name="snowballs">set(plugin[snow].mode, image); set(plugin[snow].imageurl,
        '%SWFPATH%/snow_image/snowball.png'); set(plugin[snow].blendmode, normal); set(plugin[snow].flakes, 2000);
        set(plugin[snow].imagescale, 0.5); set(plugin[snow].speed, 1.0); set(plugin[snow].shake, 4.0);
        set(plugin[snow].speedvariance, 2.0); set(plugin[snow].spreading, 2.0); set(plugin[snow].wind, 0.0);
    </action>
    <action name="snowflakes">set(plugin[snow].mode, image); set(plugin[snow].imageurl,
        '%SWFPATH%/snow_image/snowflake.png'); set(plugin[snow].blendmode, add); set(plugin[snow].flakes, 2000);
        set(plugin[snow].imagescale, 0.4); set(plugin[snow].speed, 0.5); set(plugin[snow].shake, 8.0);
        set(plugin[snow].speedvariance, 2.0); set(plugin[snow].spreading, 2.0); set(plugin[snow].wind, 0.0);
    </action>
    <action name="silverstars">set(plugin[snow].mode, image); set(plugin[snow].imageurl,
        '%SWFPATH%/snow_image/silverstar.png'); set(plugin[snow].blendmode, add); set(plugin[snow].flakes, 2000);
        set(plugin[snow].imagescale, 0.3); set(plugin[snow].speed, 1.0); set(plugin[snow].shake, 4.0);
        set(plugin[snow].speedvariance, 2.0); set(plugin[snow].spreading, 2.0); set(plugin[snow].wind, 0.0);
    </action>
    <action name="goldenstars">set(plugin[snow].mode, image); set(plugin[snow].imageurl,
        '%SWFPATH%/snow_image/star.png'); set(plugin[snow].blendmode, normal); set(plugin[snow].flakes, 1000);
        set(plugin[snow].imagescale, 1.0); set(plugin[snow].speed, 1.0); set(plugin[snow].shake, 4.0);
        set(plugin[snow].speedvariance, 2.0); set(plugin[snow].spreading, 1.9); set(plugin[snow].wind, 0.0);
    </action>
    <action name="hearts">set(plugin[snow].mode, image); set(plugin[snow].imageurl, '%SWFPATH%/snow_image/heart.png');
        set(plugin[snow].blendmode, normal); set(plugin[snow].flakes, 250); set(plugin[snow].imagescale, 0.5);
        set(plugin[snow].speed, 1.0); set(plugin[snow].shake, 4.0); set(plugin[snow].speedvariance, 2.0);
        set(plugin[snow].spreading, 1.5); set(plugin[snow].wind, 0.0);
    </action>
    <action name="smileys">set(plugin[snow].mode, image); set(plugin[snow].imageurl, '%SWFPATH%/snow_image/smiley.png');
        set(plugin[snow].blendmode, normal); set(plugin[snow].flakes, 1000); set(plugin[snow].imagescale, 1.0);
        set(plugin[snow].speed, 1.0); set(plugin[snow].shake, 4.0); set(plugin[snow].speedvariance, 2.0);
        set(plugin[snow].spreading, 1.5); set(plugin[snow].wind, 0.0);
    </action>
    <action name="money">set(plugin[snow].mode, image); set(plugin[snow].imageurl, '%SWFPATH%/snow_image/redpack.png');
        set(plugin[snow].blendmode, normal); set(plugin[snow].flakes, 500); set(plugin[snow].imagescale, 0.8);
        set(plugin[snow].speed, 0.8); set(plugin[snow].shake, 8.0); set(plugin[snow].speedvariance, 3.0);
        set(plugin[snow].spreading, 2.5); set(plugin[snow].wind, 0.0);
    </action>
    <action name="rain">set(plugin[snow].mode, image); set(plugin[snow].imageurl, '%SWFPATH%/snow_image/rain.png');
        set(plugin[snow].blendmode, normal); set(plugin[snow].flakes, 1000); set(plugin[snow].color, 0x7FAFFF);
        set(plugin[snow].speed, 20.0); set(plugin[snow].shake, 1.0); set(plugin[snow].speedvariance, 1.0);
        set(plugin[snow].spreading, 4.0); set(plugin[snow].wind, 2.0);
    </action>
    <action name="midrain">set(plugin[snow].mode, image); set(plugin[snow].imageurl, '%SWFPATH%/snow_image/rain.png');
        set(plugin[snow].blendmode, normal); set(plugin[snow].flakes, 2500); set(plugin[snow].color, 0x7FAFFF);
        set(plugin[snow].speed, 20.0); set(plugin[snow].shake, 1.0); set(plugin[snow].speedvariance, 1.0);
        set(plugin[snow].spreading, 6.0); set(plugin[snow].wind, 2.0);
    </action>
    <action name="heavyrain">set(plugin[snow].mode, image); set(plugin[snow].imageurl, '%SWFPATH%/snow_image/rain.png');
        set(plugin[snow].blendmode, normal); set(plugin[snow].flakes, 4000); set(plugin[snow].color, 0x9FAFFF);
        set(plugin[snow].speed, 20.0); set(plugin[snow].shake, 0.0); set(plugin[snow].speedvariance, 1.0);
        set(plugin[snow].spreading, 10.0); set(plugin[snow].wind, 2.0);
    </action>
    <action name="customeffect">set(plugin[snow].mode, image); set(plugin[snow].imageurl, '%1');
        set(plugin[snow].blendmode, normal); set(plugin[snow].flakes, 500); set(plugin[snow].imagescale, 1.0);
        set(plugin[snow].speed, 1.0); set(plugin[snow].shake, 4.0); set(plugin[snow].speedvariance, 2.0);
        set(plugin[snow].spreading, 1.9); set(plugin[snow].wind, 0.0);
    </action>
    <events name="speechevents"
            onnewpano="indexoftxt(result, get(scene[get(xml.scene)].bgspeech),sound); if(result GE 0,tween(sound[bgsnd].volume, 0.5)); set(speech_bgmusic,get(scene[get(xml.scene)].bgspeech)); if(speech_bgmusic,js(openSpeechVoiceBtn());playsound(bgs,get(scene[get(xml.scene)].bgspeech),1,tween(sound[bgsnd].volume, 1)););"
            onremovepano="stopsound(bgs);stopsound(bgm);stopsound(hotspotbgm);" keep="true"/>
                                                                                                                                                                                                                                                                                                                                                                                             
    <!-- <events name="advancedsetting" onnewscene="if(!webvr.isenabled, js(initAdvancedSetting(get(xml.scene)));skin_thumb_current(get(last_view_scene_index)); set(last_view_scene_index,get(scene[get(xml.scene)].index)));"
            onloadcomplete="js(setInitAngle());" onviewchange="js(__krfn.angle.radarRotate(get(xml.scene),get(view.hlookat)));"
            onclick="skin_showthumbs(false);" keep="true"/> -->
    <action name="do_crop_animation">registerattribute(xframes, calc((imagewidth / %1) BOR 0));
        registerattribute(yframes, calc((imageheight / %2) BOR 0)); registerattribute(frames, calc(xframes * yframes));
        registerattribute(frame, 0); set(crop, '0|0|%1|%2'); setinterval(calc('crop_anim_' + name), calc(1.0 / %3),
        if(loaded, inc(frame); if(frame GE frames, if(onlastframe !== null, onlastframe() ); set(frame,0); ); mod(xpos,
        frame, xframes); div(ypos, frame, xframes); Math.floor(ypos); mul(xpos, %1); mul(ypos, %2); calc(crop, xpos +
        '|' + ypos + '|%1|%2'); , clearinterval(calc('crop_anim_' + name)); ); );
    </action>
    <action name="hotspot_enterVR">
                                                                             
      for(set(i,0), i LT hotspot.count, inc(i), copy(lhotspot, hotspot[get(i)]);
          if(lhotspot.hsvrfalse, 
            set(lhotspot.visible,false);
         ); 
        if(lhotspot.hsvrtrue,
           set(lhotspot.visible,true); 
          ); 
        );
    </action>
    <action name="hotspot_exitVR">for(set(i,0), i LT hotspot.count, inc(i), copy(lhotspot, hotspot[get(i)]);
        if(lhotspot.hsvrfalse, set(lhotspot.visible,true); ); if(lhotspot.hsvrtrue, set(lhotspot.visible,false); ); );
    </action>
	
    <action name="addImgTextHotSpot">
      set(schp_name,%2); 

      set(hotspot[get(schp_name)].url,%1);
      set(hotspot[get(schp_name)].ath,%4);
      set(hotspot[get(schp_name)].atv,%5);
      set(hotspot[get(schp_name)].hotspottitle,%3);
      set(hotspot[get(schp_name)].wordcontent,%9);
      set(hotspot[get(schp_name)].hotspotlink,%8);
      set(hotspot[get(schp_name)].alpha,1);
      set(hotspot[get(schp_name)].scale,1);
      set(hotspot[get(schp_name)].autoalpha,false);
      set(hotspot[get(schp_name)].distorted,false);
      set(hotspot[get(schp_name)].width,'prop');
      set(hotspot[get(schp_name)].height,%11);

      set(hotspot[get(schp_name)].visible,true);
	    set(hotspot[get(schp_name)].onhover,showtext(get(hotspottitle),skintext)); 
      addhotspot(get(schp_name));
      set(hotspot[get(schp_name)].onclick,'js(__krfn.utils.linkopen(%8,%2));');

      if(%7 == false,
        , 
        set(hotspot[get(schp_name)].ondown,draghotspot(););
        set(hotspot[get(schp_name)].onup,js(__krfn.angle.updateHotSpotData(get(xml.scene),get(name),get(ath),get(atv),"imgtext")));
      );

      <!-- if(%6 == '1',
         txtadd(hotspot[get(schp_name)].onloaded,"do_crop_animation(60,60, 30);");
		  ); -->
    
      txtadd(hotspot[get(schp_name)].onloaded,"add_all_the_time_tooltip(hotspot[get(name)].hotspottitle);");
      set(hotspot[get(schp_name)].onhover,null);
      set(hotspot[get(schp_name)].onout,null);
      set(hotspot[get(schp_name)].onover,null);


      txtadd(tooltipname, 'tooltip_', get(schp_name));
         
      set(plugin[get(tooltipname)].onclick,'js(__krfn.utils.linkopen(%8,%2));');

      if(%10 == true,
        set(plugin[get(tooltipname)].visible,true);,
        set(plugin[get(tooltipname)].visible,false);
      );

      txtadd(csstxt, 'text-align:center; color:#FFFFFF; font-family:STXihei; font-size:', %12,'px');
      set(plugin[get(tooltipname)].css,get(csstxt)));,

    </action>

    <action name="add_all_the_time_tooltip">
      txtadd(tooltipname, 'tooltip_', get(name)); addplugin(get(tooltipname));
        txtadd(plugin[get(tooltipname)].parent, 'hotspot[', get(name), ']');
        set(plugin[get(tooltipname)].url,'%SWFPATH%/plugins/textfield.swf');
        set(plugin[get(tooltipname)].align,center);
        set(plugin[get(tooltipname)].edge,top);
        set(plugin[get(tooltipname)].x,0);
        set(plugin[get(tooltipname)].y,-130%);
        set(plugin[get(tooltipname)].autowidth,true);
        set(plugin[get(tooltipname)].height,36); 
        if(device.mobile,set(plugin[get(tooltipname)].scale,0.7));
        if(device.mobile,set(plugin[get(tooltipname)].height,48));

        set(plugin[get(tooltipname)].background,true);
        set(plugin[get(tooltipname)].backgroundcolor,0x000000); 
        set(plugin[get(tooltipname)].roundedge,5);
        set(plugin[get(tooltipname)].backgroundalpha,0.5);
        set(plugin[get(tooltipname)].padding,5);
        set(plugin[get(tooltipname)].vcenter,true); 
        set(plugin[get(tooltipname)].border,false);
        set(plugin[get(tooltipname)].borderwidth,1);
        set(plugin[get(tooltipname)].bordercolor,0xFFFFFF);
        set(plugin[get(tooltipname)].borderalpha,0.2);
        set(plugin[get(tooltipname)].glow,0); 
        set(plugin[get(tooltipname)].glowcolor,0xFFFFFF);
        <!-- set(plugin[get(tooltipname)].css,'text-align:center; color:#FFFFFF; font-family:STXihei; font-size:14px;');
        if(device.mobile,
        set(plugin[get(tooltipname)].css,'text-align:center; color:#FFFFFF;
        font-family:STXihei; font-weight:bold; font-size:14px;'); ); -->
        set(plugin[get(tooltipname)].textshadow,0);
        set(plugin[get(tooltipname)].textshadowrange,6.0); 
        set(plugin[get(tooltipname)].textshadowangle,90); 
        if(text ==
        '' OR text === null, copy(plugin[get(tooltipname)].html,%1), copy(plugin[get(tooltipname)].html,text) );
        set(plugin[get(tooltipname)].enabled,true);
    </action>
    <layer name="mapcontainer"  keep="true" type="container" bgcolor="0x000000" bgalpha="0.2" align="righttop" x="95"
           y="0" width="400" height="300" visible="false">
        <!-- <layer name="map" url=""  align="center" x="0" y="0" width="392" height="292" handcursor="false"
               scalechildren="false">
            <layer name="radarmask" type="container"  align="lefttop" width="100%" height="100%" maskchildren="true">
                <layer name="radar" visible="false"  url="%SWFPATH%/plugins/radar.swf" alturl="%SWFPATH%/plugins/radar.js" align="lefttop" edge="center"
                       zorder="1" scale="0.5" fillcolor="0xFFFFFF" fillalpha="0.8" linecolor="0xFF0000" linewidth="0.5"
                       linealpha="0.5" headingoffset="0"/>
                <layer name="activespot" url="%SWFPATH%/static/images/kr/radar-active.png" scale="1.0" oy="0" align="lefttop"
                       edge="center" zorder="3" visible="false"/>
            </layer>
        </layer> -->
		<layer name="mapzoom" style="mapzooms"  keep="true" align="center"  y="164" x="12" visible="true">
		</layer>
    </layer>
	<layer name="mapzoomclose" style="mapzoomcloses"  keep="true"  visible="false">
	</layer>
	<style name="mapzoomcloses" url="%SWFPATH%/skin/close.png" alpha="1" scale="0.4"   parent="stage" zorder="99" visible="false"
           onclick="zoomRadarclose();"/>		
	<style name="mapzooms" url="%SWFPATH%/skin/mapZoom.png" alpha="0.8" scale="0.7" oy="0" align="center"  zorder="2"
           onclick="zoomRadar();"/>			   
	<style name="mapcc"	devices="!mobile" url="%SWFPATH%/plugins/scrollarea.swf" alturl="%SWFPATH%/plugins/scrollarea.js" keep="true" align="righttop" x="95" y="0"  />		   
    <style name="spot" url="%SWFPATH%/static/images/kr/radar-out.png" scale="1.0" oy="0" align="lefttop" edge="center" zorder="2"
           onclick="subtxt(spotid,get(name),5,38);if(spotid != get(xml.scene), loadscene(get(spotid),null,MERGE,BLEND(1)); );"/>
		   
	<action devices="!mobile" name="zoomRadar"> 
 set(layer[mapzoomclose].visible,true);
 set(layer[mapzoom].visible,false);
 set(layer[mapcontainer].width,100%);
 set(layer[mapcontainer].height,100%);
 set(layer[mapcontainer].x,0);
 set(layer[mapcontainer].bgalpha,0.5);
 set(layer[map].scale,2.4);
  js(toggleBtns(0));
 set(layer[mapcontainer].align,center);
 set(layer[map].align,center);
 set(layer[mapzoomclose].align,righttop);

 </action>	
 
 <action devices="mobile" name="zoomRadar"> 
 set(layer[mapzoomclose].visible,true);
 set(layer[mapzoom].visible,false);
 set(layer[mapcontainer].width,100%);
 set(layer[mapcontainer].height,100%);
 set(layer[mapcontainer].x,0);
 set(layer[mapcontainer].bgalpha,0.5);
 set(layer[map].scale,1.4);
 js(toggleBtns(0));
 set(layer[mapcontainer].align,center);
 set(layer[map].align,center);
 set(layer[mapzoomclose].align,righttop);
 
 </action>	
 	<action name="zoomRadarclose"> 
 
 set(layer[mapzoom].visible,true);
 set(layer[mapcontainer].width,400);
 set(layer[mapcontainer].height,300);
 set(layer[mapcontainer].x,95);
 set(layer[mapcontainer].bgalpha,0.2);
 set(layer[map].scale,1);
 set(layer[mapcontainer].align,righttop);
 set(layer[map].align,center);
 js(toggleBtns(1));
 set(layer[mapzoomclose].visible,false);
 </action>	
    <action name="activatespot">txtadd(spotidnow,'spot_',get(xml.scene)); copy(layer[radar].x, layer[get(spotidnow)].x);
        copy(layer[radar].y, layer[get(spotidnow)].y); copy(layer[activespot].x, layer[get(spotidnow)].x);
        copy(layer[activespot].y, layer[get(spotidnow)].y); set(layer[radar].heading, %1); set(layer[radar].visible,
        true); set(layer[activespot].visible, true); set(layer[get(spotidnow)].visible, false);
    </action>
    <action name="addTourGuidePoint">set(tour_point_name, %1); addhotspot(get(tour_point_name));
        set(hotspot[get(tour_point_name)].url,'%SWFPATH%/static/images/kr/tourpoint.png');
        set(hotspot[get(tour_point_name)].ath,%2); set(hotspot[get(tour_point_name)].atv,%3);
        set(hotspot[get(tour_point_name)].visible,%5); set(hotspot[get(tour_point_name)].width,40);
        set(hotspot[get(tour_point_name)].height,40); set(hotspot[get(tour_point_name)].zoom,false);
        set(hotspot[get(tour_point_name)].ondown,'draghotspot();');
        set(hotspot[get(tour_point_name)].onup,'js(putTourGuideLocation(get(name),get(ath),get(atv)));');
        set(hotspot[get(tour_point_name)].onclick,'tourpointclick();'); txtadd(tooltipname, 'tooltip_',
        get(tour_point_name)); addlayer(get(tooltipname)); txtadd(layer[get(tooltipname)].parent,
        'hotspot[',get(tour_point_name),']'); set(layer[get(tooltipname)].url,'%SWFPATH%/plugins/textfield.swf');
        set(layer[get(tooltipname)].align,center); set(layer[get(tooltipname)].edge,center);
        set(layer[get(tooltipname)].width,40); set(layer[get(tooltipname)].height,40);
        set(layer[get(tooltipname)].background,false); set(layer[get(tooltipname)].backgroundcolor,0x039be5);
        set(layer[get(tooltipname)].roundedge,20); set(layer[get(tooltipname)].glow,4);
        set(layer[get(tooltipname)].glowcolor,0xFFFFFF); set(layer[get(tooltipname)].css,'text-align:center;
        line-height:40px;color:#000000; font-family:"Microsoft YaHei"; font-weight:normal; font-size:14px;');
        set(layer[get(tooltipname)].html,%4); set(layer[get(tooltipname)].enabled,false);
    </action>
    <action name="tourpointclick">js(krpTourPointClick(get(name)));</action>
    <layer name="wordcontainer" keep="true" type="container" bgcolor="0x000000" bgalpha="0.8" align="lefttop" x="0"
           y="0" width="100%" height="100%" visible="false" zorder="100" bgcapture="true"
           onclick="toggle_word_show(false)">
        <layer name="wordtitle" parent="wordcontainer" keep="true" type="container" align="top" width="100%"
               height="20%">
            <layer name="wordtitlestr" url="%SWFPATH%/plugins/textfield.swf" align="center" background="false"
                   css="text-align:center;color:#ffffff;font-weight:700; font-size:24px;" html=""></layer>
        </layer>
        <layer name="wordcontent" parent="wordcontainer" keep="true" type="container" align="bottom" edge="bottom"
               width="100%" height="80%" bgcolor="0xaaaaaa">
            <layer name="wordcontentstr" url="%SWFPATH%/plugins/textfield.swf" align="top" width="80%"
                   background="false" css="text-align:left;color:#ffffff;font-weight:500; font-size:18px;" html=""
                   visible="true"></layer>
        </layer>
    </layer>
    <action name="toggle_word_show">if(%1 == true, set(layer[wordtitlestr].html,%2); set(layer[wordcontentstr].html,%3);
        set(layer[wordcontainer].visible, true); tween(layer[wordcontainer].alpha, 1.0, 0.5,easeOutQuad); ,
        tween(layer[wordcontainer].alpha, 0.0, 0.5,easeOutQuad,set(layer[wordcontainer].visible, false);); );
    </action>
    <action name="play_hotspot_voice">stopsound(hotspotbgm); playsound(hotspotbgm,%1,1);</action>
    <events onresize="make_gallery(get(activeGallery));"/>
    <layer name="gallery" type="container" align="center" width="100%" height="100%" alpha="0" autoalpha="true"
           bgcolor="0x000000" bgalpha="0.8" keep="true" zorder="100">
        <!-- <layer name="gallery_scrollarea" url="%SWFPATH%/plugins/scrollarea.swf" alturl="%SWFPATH%/plugins/scrollarea.js"
               keep="true" align="left" width="0" height="100%" zorder="1" direction="h"
               ondown="set(gallery_scrollarea_start_pos, get(x))"></layer>
        <layer name="arrow_left" align="left" x="10" keep="true" visible="false" zorder="2" onclick="move_image(left)"
               url="%SWFPATH%/static/images/kr/left-white.png"/>
        <layer name="arrow_right" align="right" x="10" keep="true" visible="false" zorder="2"
               onclick="move_image(right)" url="%SWFPATH%/static/images/kr/right-white.png"/>
        <layer name="gallery_close" align="righttop" x="10" y="10" keep="true" zorder="100"
               onclick="hide_gallery();js(toggleBtns(true));" url="%SWFPATH%/static/images/kr/close.png"/> -->
    </layer>
    <action name="open_show_scene_thumb">
      if(scene.count GT 1, skin_showthumbs(false); );
    </action>
    <settings imagewidth="" imageheight="" objectid="" objectnum=""/>
    <events onresize="updateframeresize(container_obj,get(settings.imagewidth),get(settings.imageheight));"
            onmousewheel="updateframesscale();js(initHotspotSetting(get(xml.scene)));"/>
    <style name="frame" keep="true" visible="false" width="100%" height="100%" scale_o="" align="center"
           onloaded="set(plugin[loadingtext].visible,false); updateframeresize(container_obj,get(imagewidth),get(imageheight));copy(scale_o,scale); copy(settings.imagewidth,imagewidth); copy(settings.imageheight,imageheight);set(layer[container_obj].visible,true);"
           ondown="copy(oldmousex,mouse.x);domouserotate();"
           onover=" set(iszoom, true); set(startzoom, true); copy(copy_mousefovchange, control.mousefovchange); copy(copy_touchzoom, control.touchzoom); set(control.mousefovchange, 0); set(control.touchzoom, false);"
           onout=" set(iszoom, false); copy(control.mousefovchange, copy_mousefovchange); copy(control.touchzoom, copy_touchzoom);"/>
    <layer name="container_obj" type="container" align="center" visible="false" maskchildren="true" bgcolor="0x000000"
           width="900" height="600" bgalpha="0.5" scalechildren="true" bgborder="5 0xFFFFFF 0.9" bgroundedge="3"
           keep="true">
        <layer name="text_mask" type="container" align="leftbottom" y="15" x="0" visible="false" height="10%"
               width="200" bgcolor="0xffffff" bgalpha="0.5" bgcapture="true" zorder="100" bgroundedge="0 3 3 0"
               scalechildren="true">
            <layer name="title" url="%SWFPATH%/plugins/textfield.swf" children="false" enabled="false" align="top"
                   autowidth="auto" height="24" vcenter="true" visible="false" border="false" background="false"
                   css="text-align:center; color:#FFFFFF; font-family:Arial; font-weight:bold; font-size:20px;" html=""
                   onloaded="updatepos();add(layer[text_mask].width,pixelwidth,20); add(layer[text_mask].height,pixelheight,0);"/>
        </layer>
        <layer name="close_mask" type="container" align="righttop" y="10" x="10" height="10%" width="200"
               bgcolor="0xffffff" bgalpha="0.5" bgcapture="true" zorder="100" bgroundedge="3" scalechildren="true">
            <layer name="closetitle" url="%SWFPATH%/plugins/textfield.swf" children="false" enabled="true" align="top"
                   width="40" height="24" vcenter="true" border="false" background="false"
                   css="text-align:center; color:#FFFFFF; font-family:Arial; font-weight:bold; font-size:16px;"
                   html="退出"
                   onloaded="updatepos();add(layer[close_mask].width,pixelwidth,10); add(layer[close_mask].height,pixelheight,0);"
                   onclick="set(layer[container_obj].visible,false);removeframes();"/>
        </layer>
        <plugin name="loadingtext" url="%SWFPATH%/plugins/textfield.swf" keep="true" zorder="100" visible="true"
                enabled="false" preload="true" align="center" autoheight="true" width="100" background="false"
                html="[p]载入中...[/p]" css="p {color:#FFFFFF; font-family:arial; font-size:16px }"/>
        <layer name="gallerynext" url="%SWFPATH%/skin/gallerybtns.png" align="right" x="0" y="0" zorder="100"
               crop="100|0|100|100" onovercrop="100|100|100|100" ondowncrop="100|100|100|100"
               ondown="set(y,1);dorotate();" onup="set(y,0)" direction="-1"/>
        <layer name="galleryprev" url="%SWFPATH%/skin/gallerybtns.png" align="left" x="0" y="0" zorder="100"
               crop="0|0|100|100" onovercrop="0|100|100|100" ondowncrop="0|100|100|100" ondown="set(y,1);dorotate();"
               onup="set(y,0)" direction="1"/>
    </layer>
    <action name="updateframeresize">div(aspect, %2,%3); mul(new_width, stagewidth, 0.70); div(new_height, new_width,
        aspect); mul(max_height, stageheight, 0.70); if(new_height GT max_height, copy(new_height, max_height);
        mul(new_width, new_height, aspect); ); div(new_width,stagewidth); div(new_height,stageheight);
        mul(new_width,100); mul(new_height,100); roundval(new_width); roundval(new_height); txtadd(layer[%1].width,
        get(new_width),'%'); txtadd(layer[%1].height, get(new_height),'%');
        copy(plugin[frame0].scale_o,plugin[frame0].scale);
    </action>
    <action name="buildframes">if(%3 != settings.objectid, for(set(i,0), i LT %2, inc(i), txtadd(fname,frame,get(i));
        removeplugin(get(fname)); ); ); for(set(i,0), i LT %2, inc(i), txtadd(fname,frame,get(i));
        txtadd(furl,%1,get(i),.jpg?imageView2/2/h/450); addplugin(get(fname));
        set(plugin[get(fname)].parent,layer[container_obj]); plugin[get(fname)].loadstyle(frame);
        copy(plugin[get(fname)].url,furl); ); set(currentframe,0); set(framecount,%2); set(oldmousex,0); showframe(0);
    </action>
    <action name="removeframes">for(set(i,0), i LT framecount, inc(i), txtadd(fname,frame,get(i));
        removeplugin(get(fname)); );
    </action>
    <action name="updateframesscale">layer[container_obj].updatepos(); for(set(i,0), i LT framecount, inc(i),
        txtadd(fname,frame,get(i)); if(iszoom, if(wheeldelta_touchscale GT 0, if(startzoom, set(startzoom,false);
        copy(start_wheeldelta_touchscale, wheeldelta_touchscale); copy(start_imagescale, plugin[get(fname)].scale); );
        div(tmp, wheeldelta_touchscale, start_wheeldelta_touchscale); mul(plugin[get(fname)].scale, start_imagescale,
        tmp); , mul(sit,get(wheeldelta),0.05); mul(sit,plugin[get(fname)].scale); plugin[get(fname)].updatepos();
        add(plugin[get(fname)].scale,sit); if(plugin[get(fname)].scale LT plugin[get(fname)].scale_o,
        copy(plugin[get(fname)].scale,plugin[get(fname)].scale_o);); ); ); );
    </action>
    <action name="showframe">txtadd(fname,frame,get(currentframe));
        txtadd(tempstr,'set(plugin[',get(fname),'].visible,false);'); ifnot(%1 == 0, delayedcall(0.03,get(tempstr)); );
        add(currentframe,%1); if(currentframe LT 0, sub(currentframe,framecount,1); ); if(currentframe == framecount,
        set(currentframe,0); ); txtadd(fname,frame,get(currentframe)); set(plugin[get(fname)].visible,true);
        ifnot(plugin[get(fname)].loaded, set(plugin[loadingtext].visible,true);, set(plugin[loadingtext].visible,false);
        );
    </action>
    <action name="dorotate">if(pressed, showframe(get(direction)); delayedcall(0.05,dorotate();); );</action>
    <action name="domouserotate">if(pressed, sub(temp,oldmousex,mouse.x); if(temp GT 0, set(temp,1); ); if(temp LT 0,
        set(temp,-1); ); showframe(get(temp)); copy(oldmousex,mouse.x); delayedcall(0.03,domouserotate();); );
    </action>
    <krpano flare_dir="%SWFPATH%/skin/lensflare"/>
    <include url="%SWFPATH%/skin/lensflare/core.xml"/>
    <lensflares name="obj">
        <item name="lensitemobj" ath="-29.85" atv="-23.55" scene="" typ="blinkstyle8" dust_effect="false"/>
    </lensflares>
    <action name="ivr_remove_flare">txtadd(na, 'flt_%1_',get(lensflares[obj].item[lensitemobj].name)); txtadd(look,
        'lookto_%1_',get(lensflares[obj].item[lensitemobj].name)); txtadd(tras,
        'trash_%1_',get(lensflares[obj].item[lensitemobj].name)); txtadd(dust,
        'dust_%1_',get(lensflares[obj].item[lensitemobj].name)); if(lensflares[obj].item[lensitemobj].scene == '%1',
        vonp(na); vonp(look); vonp(tras); vonp(dust); vonp(flara_on_scene_scroll); vonh_all(tagmini, lensitemobj); );
    </action>
   <action name="addLensflares">
           set(lensflares[obj].item[lensitemobj].scene,get(xml.scene));
           set(lensflares[obj].item[lensitemobj].ath,%1);
           set(lensflares[obj].item[lensitemobj].atv,%2);
           load_flare_content();
       </action>
    <action name="addSunset">addhotspot(sunset_hs); set(hotspot[sunset_hs].url,'%SWFPATH%/static/images/kr/sunset.png');
        set(hotspot[sunset_hs].ath,%1); set(hotspot[sunset_hs].atv,%2); set(hotspot[sunset_hs].zorder,100);
        set(hotspot[sunset_hs].visible,true);
        set(hotspot[sunset_hs].ondown,'draghotspot();ivr_remove_flare(get(xml.scene));');
        set(hotspot[sunset_hs].onup,'js(updateEffectSetting(get(xml.scene),get(ath),get(atv)));');
        addLensflares('%1','%2');
    </action>
    <action name="removeSunset">removehotspot(sunset_hs); ivr_remove_flare(get(xml.scene));</action>
  <!-- 表盘不动 表针动 -->
	<!-- <layer name="compass" devices="html5.and.webgl" url="compass_bg.png" keep="true" scale="0.4" visible="false" align="lefttop" x="16" y="200" children="false" scalechildren="true" destscale="0.4" onclick="switch(destscale,1.0,0.4);tween(scale,get(destscale));lookto(0,0,90);">
		<layer name="compass1_plate"   url="compass_plate.png" keep="true"    align="center"  zorder="1" />
		<layer name="compass1_pointer" url="compass_pointer.png" keep="true"  align="center"  zorder="2" />
		<layer name="compass1_ring"    url="compass_ring.png"  keep="true"   align="lefttop" zorder="3" />
	</layer>
	<layer name="compass" devices="mobile" url="compass_bg.png" keep="true" scale="0.3" visible="false" align="lefttop" x="16" y="18%" children="false" scalechildren="true" destscale="0.3" onclick="switch(destscale,1.0,0.3);tween(scale,get(destscale));lookto(0,0,90);">
		<layer name="compass1_plate"   url="compass_plate.png" keep="true"    align="center"  zorder="1" />
		<layer name="compass1_pointer" url="compass_pointer.png" keep="true"  align="center"  zorder="2" />
		<layer name="compass1_ring"    url="compass_ring.png"  keep="true"   align="lefttop" zorder="3" />
	</layer> -->
	<!-- 视野改变事件 -->
	<events name="compass_events" keep="true" onviewchange="compass_update_rotate();" />
	 
	<!-- 更新指南针旋转数值 -->
	<action name="compass_update_rotate">
		<!-- set(global_heading, 180); -->
		calc(plugin[compass1_pointer].rotate, view.hlookat - global_heading);		
	</action>

</krpano>