autorotate command to left in actionscript...

  • hye Klaus... wht is the code/command for calling autorotate to left other than this..


    var calls:String = "";
    calls += "autorotate.enabled,true;";
    calls += "autorotate.accel,-5;";
    calls += "autorotate.speed,-10;";
    krpano.call(calls);

    maybe im wrong.... but this code didnt work..

  • var calls:String = "";
    calls += "autorotate.enabled,true;";
    calls += "autorotate.accel,-5;";
    calls += "autorotate.speed,-10;";
    krpano.call(calls);

    maybe im wrong.... but this code didnt work..

    Hi,

    the set() is missing

    correct would be:

    Code
    var calls:String = "";
    calls += "set(autorotate.enabled,true);";
    calls += "set(autorotate.accel,-5);";
    calls += "set(autorotate.speed,-10);";
    krpano.call(calls);

    or better: (without call, just set direct)

    Code
    krpano.set("autorotate.enabled",true);
    krpano.set("autorotate.accel",-5);
    krpano.set("autorotate.speed",-10);

    or even better: (from the code performance aspect)

    Code
    var autorotate:Object = krpano.get("autorotate");
    autorotate.enabled=true;
    autorotate.accel=-5;
    autorotate.speed=-10;

    best regards,
    Klaus

Participate now!

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