You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

bulp

Intermediate

  • "bulp" started this thread

Posts: 388

Location: Malaysia

  • Send private message

1

Thursday, October 1st 2009, 5:15pm

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..

2

Thursday, October 1st 2009, 9:00pm

Going by this article

set autorotate move to left...
you should set only the speed attribute to a negative value.

Jarredja

bulp

Intermediate

  • "bulp" started this thread

Posts: 388

Location: Malaysia

  • Send private message

3

Thursday, October 1st 2009, 10:26pm

oops.. *whistling*

actually i try to make autorotate switch button to left or right..... in as3...

that code couldnt work... *g*

4

Monday, October 5th 2009, 12:06pm

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:

Source code

1
2
3
4
5
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)

Source code

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


or even better: (from the code performance aspect)

Source code

1
2
3
4
var autorotate:Object = krpano.get("autorotate");
autorotate.enabled=true;
autorotate.accel=-5;
autorotate.speed=-10;


best regards,
Klaus

bulp

Intermediate

  • "bulp" started this thread

Posts: 388

Location: Malaysia

  • Send private message

5

Wednesday, October 7th 2009, 4:25am

thank you very much Klaus.... *thumbsup* *thumbsup* *thumbsup*