Hello Klaus & Co.
Is it possible to "hide" a krpano window via the Javascript API after its been embedded into a HTML page? Such as sending a call to the KRpano Flash object to set visible=false?
Currently I can hide a KRpano instance off the screen by changing the css class assigned to the KRpano object in html, but the screen flickers a bit as the browser relocates the krpano object.
For example, after initializing the Krpano instance with the id of krpanoswf running in the browser window my application calls the following functions to show or hide the krpano object on the screen...
<script>
function showkrpano() {
var swf = document.getElementById("krpanoswf");
swf.call("breakall();freezeview(false);");
swf.classname = "show_krpano";
}
function hidekrpano() {
var swf = document.getElementById("krpanoswf");
swf.call("breakall();freezeview(true);");
swf.classname = "hide_krpano";
}
</script>
Display More
the swf.classname referenced in the functions are in an external viewer.css file with the following definitions
.show_krpano {
position: absolute;
width: 660px;
height: 436px;
left: 1px;
top: 1px;
padding-top:0;
padding-left:0;
}
.hide_krpano {
position: absolute;
width: 1px;
height: 1px;
left: 2000px;
top: 2000px;
padding-top:0;
padding-left:0;
}
Display More
If there is a better way to do this, I'd love to know how.
Thanks for your help. Keep up the good work!
Lee
---
Lee Evans
levans@cleartours.com