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

Monday, November 23rd 2015, 9:40pm

Hide skin on startup, but via vars instead of XML

I have a number of tours being created and I don't always have immediate control over the tour.xml.

Is there any way I can force a minimise of the menu bar, but from the settings/var object when embedding in Javascript, as I do with the autorotate?

Source code

1
2
3
4
5
6
7
8
9
10
<script type="text/javascript"> 

	
	var uid = "<?php echo $UID; ?>"; 

	var settings = {}; 
	settings["autorotate.enabled"] = true;

	embedpano({ swf: "Krpano.swf", xml: uid, target: "pano", html5: "prefer", initvars: settings, passQueryParameters: true });
</script>



I have played with an "onready" callback but I'm not sure what to hook a skin_hideskin() call up with.

Thanks
Martin...

2

Tuesday, November 24th 2015, 12:08am

Worked it out...

should it be useful to anyone else:

Source code

1
2
3
4
5
6
7
    <script type="text/javascript">         var uid = "<?php echo $UID; ?>";         var settings = {};         settings["autorotate.enabled"] = true;

        embedpano({            swf: "Krpano.swf",            xml: uid,            target: "pano",            html5: "prefer",            initvars: settings,            passQueryParameters: true,            onready: hidemenu        });

        function hidemenu(krpano) {             krpano.call("skin_hideskin();");
        }
    </script>

3

Monday, May 21st 2018, 1:11pm

Big thanks for your solution! *attention*
Library of code samples like this is very needed!