hi everybody ...
I make tour with polygon hotspot and I use krpano 1.19 pre3 ... my polyton hotspot is working on HTML5 desktop browser very well but in mobile device it doesn't detect the hotspot and show nothing ...
here is my style:
Code
<style name="pichotspot" capture="false" zorder="1" url.touch="skin/zoomicon.png" zoom="true" scale.mobile="0.75" scale.no-mobile="0.5" fillcolor="0xFFFFFF" fillalpha="0.25" borderwidth="4" bordercolor="0xFFFFFF" borderalpha="1" alpha.no-touch="0.0" onover.no-touch="tween(alpha,1);" onout.no-touch="tween(alpha,0);" onclick="showpic();"/>
here is my actions:
Code
<action name="calc_flyout_size">
div(screen_sideaspect, stagewidth, stageheight); div(hotspot_sideaspect, hotspot[%1].width, hotspot[%1].height); if(screen_sideaspect LT hotspot_sideaspect,
<!-- align at screen width -->
div(hotspot[%1].width,stagewidth,stageheight); mul(hotspot[%1].width,80); txtadd(hotspot[%1].width,'%'); set(hotspot[%1].height,prop); ,
<!-- align at screen height -->
set(hotspot[%1].width,prop); set(hotspot[%1].height,80%); );
</action>
<!-- fly in a hotspot = show hotspot fixed at screen -->
<action name="flyin">
if(hotspot[%1].flying == 0.0, hotspot[%1].resetsize(); calc_flyout_size(%1); ); if(hotspot[%1].oldscale === null, copy(hotspot[%1].oldscale, hotspot[%1].scale) ); if(hotspot[%1].oldrx === null, copy(hotspot[%1].oldrx, hotspot[%1].rx) ); if(hotspot[%1].oldry === null, copy(hotspot[%1].oldry, hotspot[%1].ry) ); if(hotspot[%1].oldrz === null, copy(hotspot[%1].oldrz, hotspot[%1].rz) ); set(hotspot[%1].enabled,true); set(hotspot[%1].visible,true); tween(hotspot[%1].alpha, 1.0); tween(hotspot[%1].flying, 1.0); tween(hotspot[%1].scale, 1.0); tween(hotspot[%1].rx, 0.0); tween(hotspot[%1].ry, 0.0); tween(hotspot[%1].rz, 0.0);
</action>
<!-- fly the hotspot out/back -->
<action name="flyout">
set(hotspot[%1].enabled,false); tween(hotspot[%1].alpha, 0.0, 0.5, default, set(hotspot[%1].visible,false); ); tween(hotspot[%1].flying, 0.0); tween(hotspot[%1].scale, get(hotspot[%1].oldscale)); tween(hotspot[%1].rx, get(hotspot[%1].oldrx)); tween(hotspot[%1].ry, get(hotspot[%1].oldry)); tween(hotspot[%1].rz, get(hotspot[%1].oldrz));
</action>
<action name="showpic">
<!-- creates a new hotspot and fly it out -->
if(hotspot[get(pic)] === null, txtadd(picfilename,'pic/pic_',get(pic),'.jpg'); addhotspot(get(pic)); getcenter(hsath,hsatv); copy(hotspot[get(pic)].ath, hsath); copy(hotspot[get(pic)].atv, hsatv); set(hotspot[get(pic)].visible,false); set(hotspot[get(pic)].distorted,true); set(hotspot[get(pic)].zorder,2); set(hotspot[get(pic)].scale,0.1); set(hotspot[get(pic)].alpha,0.0); set(hotspot[get(pic)].onloaded, flyin(get(name)) ); set(hotspot[get(pic)].onclick, flyout(get(name)) ); copy(hotspot[get(pic)].url, picfilename); , flyin(get(pic)); );
</action>
<!--
thumbnail actions begin (remove the 'buildthumbs()' call in the onstart event to remove the thumbs)
-->
<action name="buildthumbs">
if(%1 != NEXT, set(i,0)); if(i LT scene.count, copy(thumb, scene[get(i)].thumburl); txtadd(thumbname,'thumb_',get(i)); addplugin(get(thumbname)); set(plugin[get(thumbname)].url, get(thumb)); set(plugin[get(thumbname)].keep, true); set(plugin[get(thumbname)].align, leftbottom); set(plugin[get(thumbname)].width, 40); set(plugin[get(thumbname)].height, 40); set(plugin[get(thumbname)].x, 10); set(plugin[get(thumbname)].y, 10); mul(plugin[get(thumbname)].x, i,3); mul(plugin[get(thumbname)].y, i,3); add(plugin[get(thumbname)].x, 5); add(plugin[get(thumbname)].y, 5); copy(plugin[get(thumbname)].xsmall, plugin[get(thumbname)].x); copy(plugin[get(thumbname)].ysmall, plugin[get(thumbname)].y); add(plugin[get(thumbname)].zorder, 100, i); set(plugin[get(thumbname)].effect,glow(0xFFFFFF,1.0,2,10000)); set(plugin[get(thumbname)].jsborder,'1px solid #FFFFFF'); copy(plugin[get(thumbname)].thumbpos, i); set(plugin[get(thumbname)].linkedscene, get(scene[get(i)].name) ); set(plugin[get(thumbname)].onclick, openthumbs() ); inc(i); buildthumbs(NEXT); );
</action>
<action name="openthumb">
if(%2 != NEXT, set(pos,0); copy(curpos, plugin[%1].thumbpos); set(xdst, 0); set(ydst, 0); ); if(pos LT curpos, inc(pos); inc(ydst,90); sub(ymax, stageheight, 100); if(ydst GT ymax, inc(xdst,90);set(ydst,0); ); openthumb(%1,NEXT); , add(xdst,10); add(ydst,10); tween(plugin[%1].x, get(xdst) ); tween(plugin[%1].y, get(ydst) ); tween(plugin[%1].width, 80); tween(plugin[%1].height, 80); );
</action>
<action name="closethumb">
tween(plugin[%1].x, get(plugin[%1].xsmall)); tween(plugin[%1].y, get(plugin[%1].ysmall)); tween(plugin[%1].width, 40); tween(plugin[%1].height, 40);
</action>
<action name="openthumbs">
if(%1 != NEXT, set(i,0); set(events.onclick, set(events.onclick,null); delayedcall(0.1, closethumbs() ); ); ); if(i LT scene.count, txtadd(thumbname,'thumb_',get(i)); openthumb(get(thumbname)); set(plugin[get(thumbname)].onclick, set(events.onclick,null); closethumbs(); loadscene(get(linkedscene),null,MERGE,BLEND(1)); ); inc(i); openthumbs(NEXT); );
</action>
<action name="closethumbs">
if(%1 != NEXT, set(i,0)); if(i LT scene.count, txtadd(thumbname,'thumb_',get(i)); closethumb(get(thumbname)); set(plugin[get(thumbname)].onclick, openthumbs() ); inc(i); closethumbs(NEXT); );
Display More
and here is my polyton hotspots samples:
Code
<hotspot name="hs001" style="pichotspot" pic="p001" ath="46.500" atv="3.000">
<point ath="-111.117" atv="-14.450" />
<point ath="-111.236" atv="0.413" />
<point ath="-104.218" atv="0.013" />
<point ath="-102.162" atv="-13.695" />
</hotspot>
and I see this sample is working on mobile very well:
https://krpano.com/tours/weingut/?html5=prefer
Thanks