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.

bg360

Trainee

  • "bg360" started this thread

Posts: 93

Location: Bulgaria

  • Send private message

1

Sunday, October 24th 2010, 3:40pm

crossdomain and krpano.swf for subdomains

Hello,
I have problem with my subdomain - http://subdomain.mydomain.com
I want to load krpano.swf and all xml files from my main domain http://mydomain.com
but I get loading error (Security Error)
I successfully load xml files from main domain with crossdomain policy only if I use krpano.swf situated in the subdomain.
Is it possible to load krpano.swf from my main domain - var swf = createswf("http://mydomain.com/krpano/krpano.swf","krpanoSWFObject"...

I want this because:
1.) I don't want visitors to load krpano.swf twice
2.) I use relative path %SWPATH for my skin files. So I have to copy all skin files to my subdomain where is my krpano.swf. In other words all should be loaded two times.

2

Monday, October 25th 2010, 10:55am

If both the swf and xml files are coming from the same domain, i don't think you'll need a cross-domain.xml.
I think you should use absolute urls in your xml files or at least use the %SWFPATH% constant in the paths to the images in your xml file.

bg360

Trainee

  • "bg360" started this thread

Posts: 93

Location: Bulgaria

  • Send private message

3

Monday, October 25th 2010, 12:54pm

I thought the same. But I couldn't launch a pano until I move the krpano.swf under the subdomain. I'll upload an example soon. I hope this time I didn't make some stupid mistake.

Thanx Srisa!

4

Monday, October 25th 2010, 3:37pm

This is what i have tried. I created a html page to be viewed from my localhost, http://localhost/view_tour.html. In that html, i had this code

Source code

1
2
var so = create_swf('http://www.remotesite.com/krpano.swf');
so.addVariable('xml', 'http://www.remotesite.com/xmls/pano1.xml');

And i could see the tour without a glitch. I have to mention that the xml in question uses absolute paths to the pano images and other resources like plugins etc.

I don't know if this has any similarity with your problem.

bg360

Trainee

  • "bg360" started this thread

Posts: 93

Location: Bulgaria

  • Send private message

5

Monday, October 25th 2010, 6:41pm

Here are my examples:
http://solun.bg360.net/test.php

var swf = createswf("http://bg360.net/krpano/krpano.swf","krpanoSWFObject", "100%", "86%");
swf.addVariable("xml","http://solun.bg360.net/sveti-dimitar/sveti-dimitar.xml");
swf.embed("krpanoDIV");



http://solun.bg360.net/test2.php

var swf = createswf("krpano/krpano.swf","krpanoSWFObject", "100%", "86%");
swf.addVariable("xml","sveti-dimitar/sveti-dimitar.xml");
swf.embed("krpanoDIV");

mindlessboss

Professional

Posts: 1,081

Location: Russia, Kaliningrad

  • Send private message

6

Monday, October 25th 2010, 6:56pm

Hi! Maybe add your subdomain in domain list in krprotect and make protected krpano.swf *unsure*
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

bg360

Trainee

  • "bg360" started this thread

Posts: 93

Location: Bulgaria

  • Send private message

7

Monday, October 25th 2010, 7:09pm

mindlessboss,
I already did it

8

Monday, October 25th 2010, 7:49pm

In your first example, test.php, swf is coming from bg360.net and xml is coming from solun.bg360.net and it throws the "security error", which is expected.
In your second example, test2.php, swf and xml are both coming from solun.bg360.net and it shows the tour as expected.

What we are missing is an html file on solun.bg360.net which loads swf and xml from bg360.net . If i understood your problem correctly from the first post, this is what you were trying to do. If my understanding of your problem is correct, can you create test3.php on solun.bg306.net, which loads both the swf and xml from the bg360.net ?

bg360

Trainee

  • "bg360" started this thread

Posts: 93

Location: Bulgaria

  • Send private message

9

Monday, October 25th 2010, 8:20pm

In your first example, test.php, swf is coming from bg360.net and xml is coming from solun.bg360.net and it throws the "security error", which is expected.
In your second example, test2.php, swf and xml are both coming from solun.bg360.net and it shows the tour as expected.

What we are missing is an html file on solun.bg360.net which loads swf and xml from bg360.net . If i understood your problem correctly from the first post, this is what you were trying to do. If my understanding of your problem is correct, can you create test3.php on solun.bg306.net, which loads both the swf and xml from the bg360.net ?
Sorry, I didn't explain it well. It's little bit more complicated.
I include xml files from the main domain here http://solun.bg360.net/sveti-dimitar/sveti-dimitar.xml
My image xml, image files and the main xml are in the subdomain. I want to include skin xml and some others common xml files from my main domain. Is it possible?

Hm, the answer is YES. I uploaded crossdomain.xml also to my subdomain!
Thank you srisa!

bg360

Trainee

  • "bg360" started this thread

Posts: 93

Location: Bulgaria

  • Send private message

10

Saturday, October 30th 2010, 10:58pm

I found unexpected problem with swfkrpano.js when krpano.swf is hosted outside of domain.
Zooming with mouse wheel inside the pano causes scrolling the page.

http://solun.bg360.net/test.php

var swf = createswf("http://bg360.net/krpano/krpano.swf","krpanoSWFObject", "100%", "86%");
swf.addVariable("xml","http://solun.bg360.net/sveti-dimitar/sveti-dimitar.xml");
swf.embed("krpanoDIV");



http://solun.bg360.net/test2.php

var swf = createswf("krpano/krpano.swf","krpanoSWFObject", "100%", "86%");
swf.addVariable("xml","sveti-dimitar/sveti-dimitar.xml");
swf.embed("krpanoDIV");

11

Tuesday, November 2nd 2010, 2:57pm

It scrolls for me on both the demos. You some content below the tour, scrolling might be because of that. Something related to the way browser handles the mouse scroll event , methinks.

bg360

Trainee

  • "bg360" started this thread

Posts: 93

Location: Bulgaria

  • Send private message

12

Tuesday, November 2nd 2010, 5:38pm

I tested on FF2, FF3, IE8, Safari4 and I used two PCs :
test.php scrolls, test2.php doesn't

Before start zooming I click somewhere in the pano.

This post has been edited 1 times, last edit by "bg360" (Nov 2nd 2010, 6:30pm)


13

Wednesday, November 17th 2010, 2:07pm

Hi,

I think this is a cross domain javascript access problem,
because the html and the script and the flash are from different domains,

best regards,
Klaus