<krpano> <action name="mobilescale" autorun="preinit"> set(stagescale, 1); </action> <action name="draghotspot"> spheretoscreen(ath, atv, hotspotcenterx, hotspotcentery, calc(mouse.stagex LT stagewidth/2 ? 'l' : 'r')); 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> <action name="hotspot_animate_new"> inc(frame,1,get(lastframe),0); mul(xpos,frame,frameheight); txtadd(crop,get(xpos),'|0|',get(framewidth),'|',get(frameheight)); delayedcall(0.035, if(loaded, hotspot_animate_new())); </action> <action name="hotspot_action"> panoclick(); set(hotspot_type, get(hotspot_type)); set(id, get(id)); if( hotspot_type == 0, hotspot_type_0_action(get(id)), hotspot_type == 1, hotspot_type_1_action(get(id)), hotspot_type == 2, hotspot_type_2_action(get(id)), hotspot_type == 3, hotspot_type_3_action(get(id)), hotspot_type_other_action(get(b), get(hotspot_type)) ); </action> <action name="hotspot_type_0_action"> <!-- 图文弹窗 --> js(showModal(%1)); </action> <action name="hotspot_type_1_action"> <!-- 大类内场景跳转 --> looktohotspot(get(name), 70, tween(easeOutCubic, 0.75)); js(sceneTo(%1)); </action> <action name="hotspot_type_2_action"> <!-- 跳到产品中心 --> js(jumpToProduct(%1)); </action> <action name="hotspot_type_3_action"> <!-- 跨大类场景跳转 --> skin_showloading(true); js(sceneToChild(%1)); </action> <action name="hotspot_type_other_action"> js(console.log(%1, %2)) </action> <action name="skin_showloading"> set(layer[skin_loading].visible, %1); </action> <action name="prev_action"> panoclick(); lookto(get(layer[prev].hlookto), get(layer[prev].vlookto), 120); js(sceneTo(get(layer[prev].id))); </action> <action name="next_action"> panoclick(); lookto(get(layer[next].hlookto), get(layer[next].vlookto), 120); js(sceneTo(get(layer[next].id))); </action> <action name="add_tooltip"> set(hotspot_text_name, get(name)); txtadd(hotspot_text_name, "_text"); sub(hotspot_text_atv, get(atv), 1); addhotspot(get(hotspot_text_name)); set(hotspot[get(hotspot_text_name)].isTooltip, get(true)); set(hotspot[get(hotspot_text_name)].html, get(tooltip)); set(hotspot[get(hotspot_text_name)].type, "text"); set(hotspot[get(hotspot_text_name)].hotspot_type, get(hotspot_type)); set(hotspot[get(hotspot_text_name)].ath, get(ath)); set(hotspot[get(hotspot_text_name)].atv, get(hotspot_text_atv)); set(hotspot[get(hotspot_text_name)].renderer, "css3d"); set(hotspot[get(hotspot_text_name)].css, font-size: 16px; color: #333; font-family: Helvetica Neue; letter-spacing:1px; text-align: center;); set(hotspot[get(hotspot_text_name)].roundedge, "6"); set(hotspot[get(hotspot_text_name)].padding, "6 9"); set(hotspot[get(hotspot_text_name)].zoom, "false"); set(hotspot[get(hotspot_text_name)].edge, "bottom"); set(hotspot[get(hotspot_text_name)].background, "true"); set(hotspot[get(hotspot_text_name)].backgroundcolor, "0xEEEEEE"); set(hotspot[get(hotspot_text_name)].shadow, "0.001"); set(hotspot[get(hotspot_text_name)].shadowrange, "6"); set(hotspot[get(hotspot_text_name)].shadowcolor, "0x000000"); set(hotspot[get(hotspot_text_name)].shadowalpha, "0.3"); set(hotspot[get(hotspot_text_name)].onclick, hotspot_action();); </action> <action name="remove_tooltip"> set(hotspot_text_name, get(name)); txtadd(hotspot_text_name, "_text"); removehotspot(get(hotspot_text_name)); </action> <action name="dubcomplete"> js(dubcomplete()); </action> <action name="panoclick"> js(panoClicked()); </action> <!-- skin events --> <events name="skin_events" keep="true" onxmlcomplete="set(events[skin_events].onxmlcomplete,null);js(keepIntro());" onnewpano="skin_showloading(true);" onremovepano="skin_showloading(true);" onloadcomplete="skin_showloading(false);js(playDub());" onmousedown="panoclick();" onxmlerror="js(console.log(get(lasterror)))" onloaderroe="js(console.log(get(lasterror)))" /> <style name="prev_container" type="container" edge="left" align="left" scalechildren="true" width="127" height="36" maskchildren="false" enabled="true" keep="false" visible="true" /> <style name="prev_text" type="text" txtshadow="0 2 3 #000 1" height="26" parent="prev" bg="false" zorder="2" x="30" y="5" keep="false" visible="true" enabled="true" css="font-size: 16px; color: #fff; font-family: Helvetica Neue; letter-spacing:1px; text-align: center; line-height: 26px; margin: 0 2px;" onclick="prev_action();" /> <style name="prev_image" type="image" keep="false" visible="true" parent="prev" enabled="true" scale="0.3" zorder="1" x="0" y="0" url="./prev.png" onclick="prev_action();" /> <style name="next_container" type="container" edge="right" align="right" scalechildren="true" width="127" height="36" maskchildren="false" enabled="true" keep="false" visible="true" onclick="layer_action();" /> <style name="next_text" type="text" txtshadow="0 2 3 #000 1" height="26" parent="next" align="right" bg="false" zorder="2" x="26" y="0" keep="false" visible="true" enabled="true" css="font-size: 16px; color: #fff; font-family: Helvetica Neue; letter-spacing:1px; text-align: center; line-height: 26px; margin: 0 2px;" onclick="next_action();" /> <style name="next_image" type="image" keep="false" visible="true" parent="next" align="right" enabled="true" scale="0.3" zorder="1" x="0" y="0" url="./next.png" onclick="next_action();" /> <layer name="skin_loading" crop="0|0|200|200" url="./loading.png" framewidth="200" frameheight="200" frame="0" lastframe="29" scale="0.3" edge="bottom" keep="true" align="center" x="5" y="-5" visible="true" bg="false" enabled="true" onloaded="hotspot_animate_new();" /> <style name="new_spotd01" crop="0|0|100|100" url="./new_spotd01_gif.png" framewidth="100" frameheight="100" frame="0" lastframe="16" scale="0.5" edge="top" keep="false" visible="true" zoom="false" distorted="false" onloaded="hotspot_animate_new();" onclick="hotspot_action();" onover="add_tooltip();" onout="remove_tooltip();" /> <style name="new_spotd02" crop="0|0|100|100" url="./new_spotd02_gif.png" framewidth="100" frameheight="100" frame="0" lastframe="16" scale="0.5" edge="top" keep="false" visible="true" zoom="false" distorted="false" onloaded="hotspot_animate_new();" onclick="hotspot_action();" onover="add_tooltip();" onout="remove_tooltip();" /> <style name="new_spotd03" crop="0|0|100|100" url="./new_spotd03_gif.png" framewidth="100" frameheight="100" frame="0" lastframe="16" scale="0.5" edge="top" keep="false" visible="true" zoom="false" distorted="false" onloaded="hotspot_animate_new();" onclick="hotspot_action();" onover="add_tooltip();" onout="remove_tooltip();" /> <style name="new_spotd09" crop="0|0|100|100" url="./new_spotd09_gif.png" framewidth="100" frameheight="100" frame="0" lastframe="16" scale="0.5" edge="top" keep="false" visible="true" zoom="false" distorted="false" onloaded="hotspot_animate_new();" onclick="hotspot_action();" onover="add_tooltip();" onout="remove_tooltip();" /> <style name="new_spotd10" crop="0|0|100|100" url="./new_spotd10_gif.png" framewidth="100" frameheight="100" frame="0" lastframe="16" scale="0.5" edge="center" keep="false" visible="true" zoom="false" distorted="false" onloaded="hotspot_animate_new();" onclick="hotspot_action();" onover="add_tooltip();" onout="remove_tooltip();" /> <style name="smallspot" type="image" url="./rd@2x.png" scale="0.3" edge="top" keep="false" visible="true" zoom="false" distorted="false" onover="tween(scale,0.33);add_tooltip();" onout="tween(scale,0.3);remove_tooltip();" /> <style name="spotstyle" type="image" url="./rd@2x.png" scale="0.6" edge="center" keep="false" visible="true" zoom="false" distorted="false" onover="add_tooltip();" onout="remove_tooltip();" onclick="hotspot_action();" /> <style name="arrowstyle" crop="0|0|100|100" url="./new_spotd01_gif.png" framewidth="100" frameheight="100" frame="0" lastframe="16" scale="0.5" edge="top" keep="false" visible="true" zoom="false" distorted="false" onloaded="hotspot_animate_new();" onclick="hotspot_action();" onover="add_tooltip();" onout="remove_tooltip();" /> <style name="arrowstyle_left" crop="0|0|100|100" url="./new_spotd02_gif.png" framewidth="100" frameheight="100" frame="0" lastframe="16" scale="0.5" edge="top" keep="false" visible="true" zoom="false" distorted="false" onloaded="hotspot_animate_new();" onclick="hotspot_action();" onover="add_tooltip();" onout="remove_tooltip();" /> <style name="arrowstyle_right" crop="0|0|100|100" url="./new_spotd03_gif.png" framewidth="100" frameheight="100" frame="0" lastframe="16" scale="0.5" edge="top" keep="false" visible="true" zoom="false" distorted="false" onloaded="hotspot_animate_new();" onclick="hotspot_action();" onover="add_tooltip();" onout="remove_tooltip();" /> <style name="spotstyle_2" type="image" url="./intro@2x.png" scale="1.6" edge="top" keep="false" visible="true" zoom="false" distorted="false" onclick="hotspot_action();" onover="tween(scale,1.65);add_tooltip();" onout="tween(scale,1.6);remove_tooltip();" /> <plugin name="dub" url="soundinterface.js" preload="true" rootpath="%CURRENTXML%/files" volume="1.0" mute="false" /> </krpano>