stop autorotate not working?

  • hi!
    im just doing an automatic tour, for offline usage...
    i have put it to the website (for performance testing...) had have this problem:
    the pano starts rotating before its loaded completely, when still showing the preview.

    this is my code:

    what is wrong with it? *confused*

  • Hi machart,

    I have tried your code, as is, in my local server... just added:
    - an image to be displayed
    - an ending </scene> tag for the <scene> tag that is missed in your code
    - and commented your line 33 <!--set(autorotate.enabled,true);--> to be sure, if the autorote looks to be enabled, it is not because of yours defined actions.
    - I also erased the set(fullscreen,true); you have in the <krpano onstart=....> because this seems to not be allowed when used on-line. (in my case, the image is not displayed... black screen) look at this thread for more info:

    Quote

    Quoted from Klaus:
    online the switching to fullscreens requires an user interaction like an mouse click or keyboard press (a security restriction of the Flashplayer)


    The code that I used was then like this:


    For me, this code works as you expect... autorotate enabled seems to be set to false
    When I uncomment your line 33, then the autorotate enabled is set to true at the end of the tweening actions in normalview1.

    Your code seems to be correct *huh*

    hope this help,
    Salut.

  • hi, michel!

    thanks for the comment and your time!

    - of course i had closed the scene-tag, but later because of another action...
    - the fullscreen tag is integrated because the final thing has to be run locally, with protected swf, and that works fine...
    - i deleted the (2nd) autorotate tag in the action and it works fine (offline)...
    - i have put the whole tour online just for testing (members area) and it still starts autorotating before it is loaded completely...

    i would like to know what changes in running the tour happen when switching between actionintervalbase="timer" and "frame"...

    hmmmm *confused*

    [EDIT] i got it! - by deleting all autorotates in the scenes... only one in the top of the xml...
    but now all panos rotate the same way...
    how to integrate a different direction in this action?:

    Code
    set(autorotate.enabled,true);
  • hi, claus!

    i think i mean something different...

    before i had this version, in which autorotate startewd too early:

    now i do it this way and the only autorotate isnt in the scene but in the top of xml:

    so i thought its possible to do something like this:

    Code
    set(autorotate.enabled,true); speed[-9]
  • so i thought its possible to do something like this:

    Code
    set(autorotate.enabled,true); speed[-9]

    Hi,

    yes, that's possible, but the correct code is:

    Code
    set(autorotate.enabled,true); set(autorotate.speed, -9);

    the xml to actions code mapping works like this:

    Code
    <xmlnode attribute="value" />


    is the same like:

    Code
    set(xmlnode.attribute, value);

    best regards,
    Klaus

  • Hi machart,

    Quote

    to be honest, i still dont understand the syntax... *wacko*

    I think it is not so difficult after you got it... I am not a pro but I am going to try to give some explanation in how I understand the syntax....
    Lets take part of your xml code above:

    Code
    <autorotate enabled="false" 
            waittime="9" 
            accel="1" 
            speed="9.0" 
            horizon="0.0" 
            tofov="70" />


    In this example:
    - autorotate is the xmlnode
    - enabled, waittime, accel,...ect are attributes for the autorotate xmlnode
    - true, 1,... ect are values of each attributes

    Now, you want to change the value for some of the autorotate attributes...
    For doing this, you use the action set ( Variable , value ) ; .
    The syntax is: set ( xmlnode . attribute , value ) ;
    Lets say that you want to give to the attribute enabled the value true

    Code
    set(autorotate.enabled,true);


    You must use the action set for each variable you want to give or change a value.
    Example:

    Code
    set(autorotate.enabled,true);
    set(autorotate.speed, -9);

    I hope I am clear... *unsure* Sure, Graydon or Klaus himself can explain much better than me *rolleyes* but if this can help, then I am happy *smile*

    Salut.

Participate now!

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