Hello there,
I mostly write everything in javascript instead of ac3. But there is a problem here.
Since I wanted to use flash buttons instead of iframe and div on swf object, I wanted to put "onclick" method on close button inside of pano. It is like that:
1- when button is loaded add close panorama onclick function to the button:
krpano().call('set(layer[closePanoramaButton].onloaded, js(addClosePanoramaOnClick()))');
2- related function:
function addClosePanoramaOnClick() {
krpano().set('layer[closePanoramaButton].onclick', 'js(closePanorama())');
}
3- and closePanorama function is:
function closePanorama(){
$('#panoramaDivC').fadeOut("slow");
}
The problem is when I hide the div with this method, next time my krpano() method returns krpano with no functions. Strangely hiding the div which is including panorama erases all krpano methods. If I hide the same div with a normal div's onclick, it doesn't happen.
What would be the problem? I am stucked on this problem more than 2-3 hours at least.
Edit:
What does it do?
__flash__removeCallback(document.getElementById("krpanoSWFObject"), "externalMouseEvent2");
this one happens if I do document.getElementsById("krpanoSWFObject").style.display="none";