Autorotation not change own parameter

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

    code as:

    Quote

    onout= "switch(autorotate.enabled)";


    Quote

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

    not works too((

    Question:
    WHY?!! *sad*

    With regards, Igor.

    Edited 2 times, last by Ukrajinec (December 19, 2012 at 10:27 AM).

  • 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:
    https://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

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!