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.

usagi

Trainee

  • "usagi" started this thread

Posts: 98

Location: Australia

Occupation: Virtual tour creator, VR app developer

  • Send private message

1

Sunday, January 24th 2010, 3:45pm

stop autorotate when going to new webpage

Hi all,

Wondering if it's possible to stop a pano autorotating when clicking on a logo. This will open another pano on a new (_blank) webpage and I want the
pano underneath it to stop autorotating on click because two panos autorotating at once is inhibiting panning performance etc.

I have this code near the top of the main xml file...

Source code

1
2
 <autorotate enabled="true"/>
<plugin name="logo" url="jinendo_indexdata/graphics/logo.jpg" keep="true" autopos="lefttop,5,5" alpha="0.7" onhover="showtext(Get Info and Take the Full Tour!);" onover="tween(alpha,1.0);" onout="tween(alpha,0.7);" onclick="openurl(http://www.shoppeek360-fukuoka.com/search/shopmenu/bars/izakaya/jinendo/jinendo.html,_blank); set(autorotate.enabled.false);"/>


The onclick opens the new page okay but it doesn't stop the initial pano rotating.

New to coding so any ideas would be greatly appreciated.

Redmond

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

2

Sunday, January 24th 2010, 4:16pm

hi usagi,

I think this is because your main.xml has <autorotate enabled="true"/>

Source code

1
2
3
<krpano version="1.0.8" logkey="false">
    <include url="jinendo_main0.xml"/>        
    <autorotate enabled="true"/>

when you call:
http://www.shoppeek360-fukuoka.com/searc…ndo.html,_blank);
the main.xml is loaded, so the autorotate sets to true...

SAlut.

usagi

Trainee

  • "usagi" started this thread

Posts: 98

Location: Australia

Occupation: Virtual tour creator, VR app developer

  • Send private message

3

Monday, January 25th 2010, 1:30am

Thank you for the tip Michel!
I tried changing the autorotate to "false" but it didn't work.

Basically,

I want to first pano to rotate automatically on load so I need to set the autorotate to "true".

When I click on the logo, it opens a new pano on a blank page. This new pano is separate from the initial pano and calls its own main xml file.
And I want the initial pano to stop rotating before it loads this new page. But it just continues to rotate and clashes with the new pano which also rotates on load.


The rotate button on the buttons works okay using switch(autorotate.enabled) but for some reason it won't work when clicking on the logo using set(autorotate.enabled,false)

Does it have something to do with loading up a new _blank page or a syntax problem?
I'm totally stumped

Any help much appreciated.
Cheers

Red

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

4

Monday, January 25th 2010, 2:44am

Hi usagi,

Source code

1
2
<autorotate enabled="true"/>
<plugin name="logo" url="jinendo_indexdata/graphics/logo.jpg" keep="true" autopos="lefttop,5,5" alpha="0.7" onhover="showtext(Get Info and Take the Full Tour!);" onover="tween(alpha,1.0);" onout="tween(alpha,0.7);" onclick="openurl(http://www.shoppeek360-fukuoka.com/search/shopmenu/bars/izakaya/jinendo/jinendo.html,_blank); set(autorotate.enabled.false);"/>
note the dot instead of coma in your code:
set(autorotate.enabled.false); ---> not correct
set(autorotate.enabled,false); ---> correct

SAlut.

usagi

Trainee

  • "usagi" started this thread

Posts: 98

Location: Australia

Occupation: Virtual tour creator, VR app developer

  • Send private message

5

Monday, January 25th 2010, 7:28am

Thank you Michel! Problem solved. The pain has subsided.

Geez, really have to check my syntax more closely.

Thanks again for your help

Red