Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

panomate

Anfänger

  • »panomate« ist der Autor dieses Themas

Beiträge: 43

Wohnort: Wohlen

Beruf: Selbständig

  • Nachricht senden

1

Dienstag, 11. November 2008, 13:43

IF autorotate=enabled, AND Hotspot "Showtext" is pressed, how can I stop rotating untill Textfield has been closed

Hi Claus
I thought it was time to use your Forum.

The issue
I have a hotspot which opens a textfeld. If autorotate is enabled, the pano keeps turning behind the opened textfield. Is there a way to stop autorotate as long as a textfiled is opened? If yes, I would be very thanksfull if you could help me with an examplecode ^^

I also would like to use different textstyles on Tooltips.. I have no idear how to set "individual styles" for Buttons and "hotspots". Help on this issue would be really appreciated too!

Thanks again for a great player!

Rienus

My Code:
<krpano version="1.0.7">

<include url="../../tour_elements/buttons.xml" />
<include url="../../tour_elements/global.xml" />
<include url="../../tour_elements/plugins.xml" />

<progress showload="no"/>

<preview type="cubestrip" url="preview.jpg" details="20" />
<display details="30" movequality="LOW" stillquality="HIGHSHARP" />

<image type="SPHERE" multires="true" tilesize="625" baseindex="1">
<level tiledimagewidth="5000" tiledimageheight="2500" details="30">
<sphere url="multires/l2_%v_%h.jpg" />
</level>

<level tiledimagewidth="2500" tiledimageheight="1250" details="30">
<sphere url="multires/l1_%v_%h.jpg" />
</level>
</image>

<textstyle name="label_hotspots"
font="Arial"
fontsize="12"
bold="false"
italic="true"
textcolor="0x000000"
background="true"
backgroundcolor="0xEEEECC"
border="true"
bordercolor="0x777700"
origin="cursor"
edge="left"
textalign="center"
effect=""
xoffset="10"
yoffset="10"
/>

<textstyle name="label_navbuttons"
font="Arial"
fontsize="14"
bold="false"
italic="true"
textcolor="0x000000"
background="true"
backgroundcolor="0xEEEECC"
border="true"
bordercolor="0x777700"
origin="cursor"
edge="left"
textalign="center"
effect="glow(0x000000,0.7,4,2);dropshadow(4,45,0x000000,4,1);"
xoffset="10"
yoffset="10"

/>

<view limitview="lookat"
vlookatmin="-90"
vlookatmax="+90"
hlookat="330.0"
vlookat="0.0"
camroll="0.0"
fov="80.0"
fovmin="30.0"
fovmax="100.0"
fisheye="0.1"
fisheyefovlink="0.55"
limitfov="true"
/>

<autorotate enabled="true"
waittime="2.5"
accel="1.5"
speed="10"
horizon="0"
/>

<control usercontrol ="all"
mousetype ="moveto"
movetocursor ="arrow"
cursorsize ="15.0"
mouseaccelerate="1.00"
mousespeed ="10.00"
mousefriction ="0.80"
keybaccelerate ="0.50"
keybspeed ="10.00"
keybfriction ="0.90"
keybinvert ="false"
mousefovchange ="1.00"
keybfovchange ="1.00"
fovspeed ="3.00"
fovfriction ="0.90"
/>

<action name="text1_effects">
tween(plugin[%1].alpha,0,0);
set(plugin[%1].alpha,0);
tween(plugin[%1].textblur,20,0);
set(plugin[%1].textblur,20);
tween(plugin[%1].blur,20,0);
set(plugin[%1].blur,20);

set(plugin[%1].enabled,true);
set(plugin[%1].visible,true);

tween(plugin[%1].alpha, 1, 0.25);
tween(plugin[%1].textblur, 0, 0.25);
tween(plugin[%1].blur, 0, 0.25);
</action>

<action name="hidetext1">
set(plugin[%1].enabled, false);
tween(plugin[%1].alpha, 0, 0.25, default, plugin[%1].set(visible,false));
tween(plugin[%1].textblur, 20, 0.25, default);
tween(plugin[%1].blur, 20, 0.25, default);
</action>



<hotspot name="text1" visible="true" zorder="20" url="../../images/info-hotspot.png" ath="335" atv="-2" scale="0.3" zoom="false" onhover="showtext(Weitere Informationen....);" onover="tween(scale,0.5);" onout="tween(scale,0.3);" onclick="action(text1_effects, text1);"
/>

<hotspot name="pano2" visible="true" zorder="20" url="../../images/hotspot.png" ath="169" atv="3" scale="0.3" zoom="false" onhover="showtext(Gehe Richtung Restaurant );" onover="tween(scale,0.5);" onout="tween(scale,0.3);" onclick="looktohotspot(pano2); loadpano(../../panos/p02/p02.xml,null,KEEPPLUGINS | KEEPCONTROL,blend(1));"
/>

<hotspot name="pano7" visible="true" zorder="20" url="../../images/hotspot.png" ath="107" atv="-5" scale="0.3" zoom="false" onhover="showtext(Gehe Richtung Innenplatz );" onover="tween(scale,0.5);" onout="tween(scale,0.3);" onclick="looktohotspot(pano7); loadpano(../../panos/p07/p07.xml,null,KEEPPLUGINS | KEEPCONTROL,blend(1));"
/>

<hotspot name="pano8" visible="true" zorder="20" url="../../images/hotspot.png" ath="-60" atv="0" scale="0.3" zoom="false" onhover="showtext(Gehe Richtung Parkplatz );" onover="tween(scale,0.5);" onout="tween(scale,0.3);" onclick="looktohotspot(pano8); loadpano(../../panos/p08/p08.xml,null,KEEPPLUGINS | KEEPCONTROL,blend(1));"
/>

<hotspot name="pano4" visible="true" zorder="20" url="../../images/hotspot.png" ath="-113" atv="0" scale="0.3" zoom="false" onhover="showtext(Gehe Richtung Sitzungszimmern );" onover="tween(scale,0.5);" onout="tween(scale,0.3);" onclick="looktohotspot(pano4); loadpano(../../panos/p04/p04.xml,null,KEEPPLUGINS | KEEPCONTROL,blend(1));"
/>


<data name="css1">
a { text-decoration:underline; color:#110088; font-weight:bold; }
a:hover { color:#ff0000; }
</data>

<data name="text1">
<p align="center">
<img src="./images/tpl.jpg" width="200" height="293" />
<font face="arial" size="12">
<textformat leftmargin="5" rightmargin="5">
<br/>
<b>TECHNOPARK</b><br />
<b>Ein Verein zur verwirklung von Businessvisionen</b><br/>
<br/>
</textformat>
</font>
</p>
<p align="left">
<font face="arial" size="12">
<textformat leftmargin="10" rightmargin="5">
Text displayed here...

<br/>
<br/>
Weitere Informationen: <a href="http://www.technopark-luzern.ch/" target="_blank">Technopark Luzern</a>
</textformat>
</font>
</p>
<br/>
<p align="center">
<font face="arial" size="12">
<a href="event:action(hidetext1,text1);">Anzeige schliessen</a>
</font>
</p>
</data>


<plugin name="text1"
visible="false"
url="../../plugins/textfield.swf"
align="center"
width="550"
height="380"
html="data:text1"
css="data:css1"
background="true"
selectable="false"
roundedge="0"
borderwidth="1"
Blur="8"
bordercolor="0x000000"
/>
</krpano>

2

Dienstag, 11. November 2008, 19:11

Hi,

in the code where the textfields is opened, add:

Quellcode

1
set(autorotate.enabled,false);


to disable auto rotation, in your example this is in the first line of the "text1_effects" action:

Quellcode

1
2
3
<action name="text1_effects">
   set(autorotate.enabled,false);
 ...


and in the code where the textfields is closed add:

Quellcode

1
set(autorotate.enabled,true);


to enable it again

in your example code here:

Quellcode

1
2
3
4
 <action name="hidetext1">
set(autorotate.enabled,true);
 set(plugin[%1].enabled, false);
...


best regards,
Klaus

panomate

Anfänger

  • »panomate« ist der Autor dieses Themas

Beiträge: 43

Wohnort: Wohlen

Beruf: Selbständig

  • Nachricht senden

3

Sonntag, 23. November 2008, 11:00

It works ;-)

Hi Klaus

Sorry for answering so late!
I did not realized, I do not get a message if a question is ananswered on your board.
I suppose, I have to take a look at the account-settings ;-)

Your Code works really good, thanks!

Rienus

panomate

Anfänger

  • »panomate« ist der Autor dieses Themas

Beiträge: 43

Wohnort: Wohlen

Beruf: Selbständig

  • Nachricht senden

4

Sonntag, 23. November 2008, 11:24

Conflict with set(autorotate.enabled,false)

Hi Claus

No I'm trying to make the next step work ;-)
If "rollover" a hotspot, the autoratate should stop. If not rollover a hotspot, it should rotate again.

That works fine with the following code:
<hotspot name="pano2" visible="true" zorder="20" url="../../images/hotspot.png" ath="169" atv="3" scale="0.3" zoom="false" onhover="showtext(Gehe Richtung Restaurant,hotspots);" onover="tween(scale,0.5); set(autorotate.enabled,false);" onout="tween(scale,0.3); set(autorotate.enabled,true);" onclick="looktohotspot(pano2); loadpano(../../panos/p02/p02.xml,null,KEEPPLUGINS | KEEPCONTROL,blend(1));"

But if i'm trying to do the same actions on the textfield, the autorotate does not stop if clicking on the textfield-hotspot.
<hotspot name="text1" visible="true" zorder="20" url="../../images/info-hotspot.png" ath="335" atv="-2" scale="0.3" zoom="false" onhover="showtext(Weitere Informationen....,hotspots);" onover="tween(scale,0.5); set(autorotate.enabled,false);" onout="tween(scale,0.3); set(autorotate.enabled,true);" onclick="action(text1_effects, text1);"

At "text1_effects" i have the next code inegrated:
<action name="text1_effects">
set(autorotate.enabled,false);


Onover and onout works fine; i suppose i created a conflict between the actions?

Your help is, as allways, very apreciated!

Regards

Rinie

5

Montag, 24. November 2008, 13:42

Hi,

the problem was:

in the "onclick" event the autorotation is disabled and in the "onout" event, which is called
when the mouse leaves the plugin it is enabled again,

a possibility would be to "remove" the "onout" code in the "onclick" call, e.g:

Quellcode

1
onclick="set(autorotate.enabled,false);set(onout,null);"


and set the "onout" event only in the "onover" event: (a little bit tricky )

Quellcode

1
onover="set(autorotate.enabled,false);set(onout,set(autorotate.enabled,true));"


best regards,
Klaus

6

Freitag, 24. Juli 2009, 07:28

how to stop autorotate when user move by mouse?
for now, when it starts autorotate, user move to another place by mouse, then wait a moment, it will continue to autorotate. how to stop it when moving by mouse?