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:

    Zitat

    onout= "switch(autorotate.enabled)";


    Zitat

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

    not works too((

    Question:
    WHY?!! *sad*

    With regards, Igor.

    2 Mal editiert, zuletzt von Ukrajinec (19. Dezember 2012 um 10:27)

  • 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

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!