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

Tuesday, April 29th 2014, 3:48pm

jscript for flash

Hi,

I can't open the jscript for the popup image or pdf document in flash, only in html5. I'm wondering why is that? Error says SecurityError: Error #2060 and I've tried to add allowScriptAccess in script embedpano in index.html but it didn't help. I'm not sure have I put it correctly, I've tried this but none helped:

embedpano({swf:"tour.swf", xml:"tour.xml", target:"pano", html5:"auto", passQueryParameters:true, allowScriptAccess:true});
..
embedpano({swf:"tour.swf", xml:"tour.xml", target:"pano", html5:"auto", passQueryParameters:true, allowScriptAccess:always});
..
embedpano({swf:"tour.swf", xml:"tour.xml", target:"pano", html5:"auto", passQueryParameters:true, allowScriptAccess:"always"});
..
embedpano({swf:"tour.swf", xml:"tour.xml", target:"pano", html5:"auto", passQueryParameters:true, allowScriptAccess:true});
..
embedpano({swf:"tour.swf", xml:"tour.xml", target:"pano", html5:"auto", passQueryParameters:true});
viewer.addVariable("allowScriptAccess", "always");

This are the codes

from index.html:
.
.
.
<script type="text/javascript" src="js/jquery/jquery-1.4.3.min.js"></script>
<script type="text/javascript" src="js/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<link rel="stylesheet" href="js/fancybox/jquery.fancybox-1.3.4.css" type="text/css" media="screen" />
<script type="text/javascript">
function openPopup(t,linktourl,w,h,type)
{
$.fancybox({
'title' : t,
'width' : w,
'height' : h,
'href' : linktourl,
'type' : type,
'autoScale' : 'true',
'overlayColor' : '#000000',
'overlayAlpha' : '0.3'
});
};
</script>
.
.
.
<script>
embedpano({swf:"tour.swf", xml:"tour.xml", target:"pano", html5:"auto", passQueryParameters:true});
</script>

from vtour.xml:

<hotspot ..
onclick="js(openPopup('title', 'path', 500, 500, 'iframe'))"
/>

2

Wednesday, April 30th 2014, 2:07pm

Hi,

what your testing environment?
Local file or local server or something embedded?

Btw - just as note - there no allowScriptAccess setting in the krpano embedding script, but that Flashplayer setting will be set already set automatically.

Best regards,
Klaus

3

Wednesday, April 30th 2014, 11:24pm

Hi,

Klaus, thank you for the allowscriptaccess tip.
I'm using the local file enviroment and the web server enviroment, and non of these work in flash, only in html5. And path to the image file is relative, i.e. /directory/file, not the global with the http.

I've been thinking is it related to the sandboxing? Do I need to insert the following --> sandbox="allow-same-origin allow-scripts allow-popups allow-forms"
in the javascript function "openPopup" but I don't know how...