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.

1

Thursday, October 16th 2014, 10:47am

Toggle button state in tour

Hi - I've got a series of 10 scenes in my tour, and the only button I have on the interface is a gyro button.

When creating a single panorama, I can easily show/hide 2 image layers to mimic the on/off states of the button.

I'm having a lot of trouble trying to achieve the same thing with the output from the pano tour droplet.

The button action works, but I can't fathom how to toggle the button states/set layers within the pano scene XML. 90% of he generated code isn't applicable for my task in this instance, but I can't successfully extract the bits I need to simple toggle the image button states

All help greatly appreciated - i'm sure it's very simple once you know how!

Posts: 1,857

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

2

Thursday, October 16th 2014, 4:36pm

Source code

1
2
3
4
5
6
7
8
9
10
11
12
<action name="turn_off_gyro">
set(layer[button].onclick,turn_on_gyo());
set(layer[button].crop,newscropvalues|newscropvalues|newscropvalues|newscropvalues|);
set(layer[button].url,newurl);

</action>

<action name="turn_on_gyro">
set(layer[button].onclick,turn_off_gyo());
set(layer[button].crop,newscropvalues|newscropvalues|newscropvalues|newscropvalues|);
set(layer[button].url,newurl);
</action>


Using either crop for a url sprite or just a new image.
Adding other code in there to turn on and off the gyro.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour