Javascript "onstart"

  • Hi all,

    How can i convert the "function" onstart of the xml:

    Code
    <krpano version="1.0.8" onstart="set(krpano.autorotate.enabled,true)">


    to javascript addVariable:


    Or what's the best way to start autorotate pano in a javascript scenario?

    Thanks,
    myky

  • Hi,

    the "krpano." prefix is not needed,
    it will also without it,

    Quote

    Or what's the best way to start autorotate pano in a javascript scenario?


    both ways are possible:

    Code
    so.addVariable("autorotate.enabled","true");


    or

    Code
    so.addVariable("onstart","set(autorotate.enabled,true);");

    choose the one you like more

    best regards,
    Klaus

Participate now!

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