Reading API Variables in the Skin

Special forum to share and discuss skins for Pano2VR and Object2VR
Post Reply
NFSTC
Posts: 20
Joined: Fri Feb 04, 2011 8:38 pm

We have situations where we lock the interaction of the panorama using the JS API (via the pano.setLocked(true) function). I would like to be able to read that variable in my skin and turn off visibility to all skin components when this is enabled.

I see that there is a way to do this with the API by changing a skin variable with the function below and then I could set an action in the skin for visibility: pano.setVariableValue(varName:String, varValue:Any).

However, I'd prefer to not change the JS at this point and would rather read that state of the panorama to set the action in the skin (the JS code is not mine so I like to modify it as little as possible). Is there a way to read if the pano is set to 'Locked' within the skin so that I can trigger an action to disable the skin components?

Thank you!
User avatar
Hopki
Gnome
Posts: 13004
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi,
Reading your post, I understand you want to lock the panorama, and prevent any interaction.
The JavaScript call javascript: player.setLocked(true); only stops the mouse, mouse wheel and keyboard, however you can still click on skin elements.

What would be a better solution is to show an active container 100% of the player size.
You can have this show and hide using a variable, so just use the JS to change the variable.

This leads to another question, how are you using the javascript, for example, javascript: player.setLocked(true); can be used in a Go To URL action.
Regards,
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
Post Reply