![]() |
|
|
|
|
|
||||||||||
|
| User list | Rules | You are not logged in.
Hi
I have a tour with 5 panos and quite a few hotspots (loading flash movies).
What is the best way to code the project so that every time a hotspot is clicked, the autorotation stops ?
Thanks
Loic
Offline
following some plugins from my (unbublished) ptp theme template, the plugin names are standard, but ptp default plugins are not containing all the statements I used. The statements are code from krpano.com... so easy for you to find there the xml reference... ,-))
<plugin name="autorotationON"
debug=""
debug-offset-y=""
url="$(STYLEDIR)/gigapixel-menu-1a.png"
width=""
height="prop"
blendmode="normal"
keep="true"
align="bottom"
x="0"
y="33"
onclick="switch(autorotate.enabled);set(plugin[autorotationON].visible,false); set(plugin[autorotationOFF].visible,true);"
crop="261|39|25|26"
onovercrop="261|239|25|26"
visible="false"
enabled="true"
handcursor=""
zorder="15"
scale=""
/>
<plugin name="autorotationOFF"
debug=""
debug-offset-y=""
url="$(STYLEDIR)/gigapixel-menu-1a.png"
width=""
height="prop"
blendmode="normal"
keep="true"
align="bottom"
x="0"
y="33"
onclick="switch(autorotate.enabled);set(plugin[autorotationOFF].visible,false); set(plugin[autorotationON].visible,true);"
crop="261|139|25|26"
onovercrop="261|339|25|26"
visible="false"
enabled="true"
handcursor=""
zorder="15"
scale=""
/>look at the onklick line. that means all listed commands are executed if user is klicking on plugin autorotationOFF or autorotationON...
and in both cases the switch(autorotate.enabled); is used... this can be used for your hotspots too...
open a build0.xml file (name of first pano if you use the default namingcheme of ptp...) and go to Hotspots section...
<!--************** Hotspots and lensflares ****************************************************-->
<hotspot name="spot0" onclick="mainloadpano(build1.xml);" url="builddata/graphics/spots/spot1.png" onhover="showtext(Salzburg - Salzachufer);" ath="-100.541" atv="4.87952"/>here you also have an onover and onout statement ...
so to change your line containg the hotspots and add the onover="..." and onout="..." statements:
<!--************** Hotspots and lensflares ****************************************************-->
<hotspot name="spot3" onclick="closeallobjects();set(plugin[spot3object].visible,true);tween(plugin[spot3object].alpha, 1);" url="builddata/graphics/spots/spot2.png" onhover="showtext(myimage);" onover="switch(autorotate.enabled);" onout="switch(autorotate.enabled);" ath="77.7207" atv="23.4405"/>and now ;-) if you go over the hotspot the autorotation will change the state (if until now autorotation is on its now turned off and vice versa...) same with onout statement, if the mouse is leaving the hotspot, autorotation is goin on again...
problem only: is user if disabling autorotation and than going over the hotspot than autorotation is enabled.... this could be captured by an additional if statement inside the onover and onout statements...
krpano docu onover....:
http://www.krpano.com/docu/xml/#plugin.onover
Georg
Last edited by gkaefer (2012-06-25 13:02:23)
Offline
ok I'll give that a try
thanks Georg
Loic
Offline
Powered by PunBB
© Copyright 2002–2005 Rickard Andersson
|
CHOOSING KOLOR Why choose Kolor? Which solution to choose? Download a trial Where can I buy? Education |
SOFTWARE Autopano Pro Autopano Giga Panotour Panotour Pro XnView |
ACCESSORIES Training DVD Panobook PROJECTS Paris 26 Gigapixels Yosemite 17 Gigapixels |
COMMUNITY Forums YouTube channel Google+ |
COMPANY Blog About Kolor Resellers Contact Visit us |
PRESS Press center Press review TOOLS My account |
