You are not logged in.

Ukrajinec

Beginner

  • "Ukrajinec" started this thread

Posts: 33

Location: Ukraine, Lviv

  • Send private message

1

Wednesday, December 19th 2012, 10:14am

Autorotation not change own parameter

The style which must to stop rotation when cursor is onhover the hotspot and start rotation, when cursor onout..

Quoted


...

<style name="stoprotate"
keep="true;"
onhover="if(autorotate.enabled == 1,
RotationTrue();
,);"
/>
...

<action name="RotationTrue">
set(autorotate.enabled, 0);
onout= "set(autorotate.enabled,true)";
</action>
...
code as:

Quoted

onout= "switch(autorotate.enabled)";

Quoted

set(style[stoprotate].onout, "switch(autorotate.enabled);");
not works too((

Question:
WHY?!! *sad*
With regards, Igor.

This post has been edited 2 times, last edit by "Ukrajinec" (Dec 19th 2012, 10:27am)


2

Thursday, December 20th 2012, 10:43am

Hi,

sorry, I'm not fully sure what you mean, but...

1. The syntax of this code is wrong:
<action name="RotationTrue">
set(autorotate.enabled, 0);
onout= "set(autorotate.enabled,true)";
</action>

You can't set attributes this way in an action.
Inside an action only the actions can be used:
http://krpano.com/docu/actions/#top

e.g. if you want to change the onout event of an plugin:
set( plugin[test].onout, set(autorotate.enabled,true) );


2. When changing an attribute from a <style> element, other element that had loaded the attributes from this style, will NOT load/update them automatically again.
The attributes from the <style> element will be only copied initially or when calling the loadstyle() action.


3. Make sure that you don't mix up onhover and onover !
The onhover event will be called in intervals as long as the mouse is hovering, while the normal onover and onout event will be called only once when the mouse moves over and out the element.

Best regards,
Klaus