Sie sind nicht angemeldet.

1

Sonntag, 24. Oktober 2010, 15:40

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

Montag, 25. Oktober 2010, 10:55

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.

3

Montag, 25. Oktober 2010, 12:54

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

Montag, 25. Oktober 2010, 15:37

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

Quellcode

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.

5

Montag, 25. Oktober 2010, 18:41

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");

6

Montag, 25. Oktober 2010, 18:56

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

7

Montag, 25. Oktober 2010, 19:09

mindlessboss,
I already did it

8

Montag, 25. Oktober 2010, 19:49

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 ?

9

Montag, 25. Oktober 2010, 20:20

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!

10

Samstag, 30. Oktober 2010, 22:58

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

Dienstag, 2. November 2010, 14:57

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.

12

Dienstag, 2. November 2010, 17:38

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.

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »bg360« (2. November 2010, 18:30)


13

Mittwoch, 17. November 2010, 14:07

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