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, March 10th 2009, 4:09am

Default xml file not working when embedded

Hi,
In the documentation it states that, if no xml file is supplied in the flashvars, krpano will default to "name of krpano SWF".xml, however, this only seems to work when opening the krpano.swf directly. When the krpano is embedded in html via swfobject 1.5 or regular <embed /> the xml does not default to "name of krpano SWF".xml

Any response, ideas, suggestions are highly appreciated.

I really would like to get this resolved and not have to attach a xml file via flashvars, to keep the embed code as simple as possible for sharing and off-site embed purposes.

Thanks,
P

This post has been edited 1 times, last edit by "pb360" (Mar 10th 2009, 5:57am)


milotimbol

Intermediate

Posts: 211

Location: Antipolo City, Philippines

Occupation: Software Engineer

  • Send private message

2

Tuesday, March 10th 2009, 7:21am

pb360,

Take a look at krprotect http://www.krpano.com/forum/wbb/index.ph…ad&threadID=331. It's a new tool by klaus. it embeds the xml in the swf, images are not embedded in the beta but I think it will be in the official release. Just read the thread I forgot what I saw there.

To download go here
http://www.krpano.com/download/beta/

I think the filename is krprotect.exe. It has a GUI and is very easy to use. On first run just setup your krpano licenses by pointing where they are located or by dragging them to the properf field then you're good to go.

Milo

3

Tuesday, March 10th 2009, 6:14pm

Thanks Milo

Thanks,
I'll give that a try. Do you know if this will also allow me to publish online with dynamic content?

Ciao,
P

4

Tuesday, March 10th 2009, 10:01pm

In the documentation it states that, if no xml file is supplied in the flashvars, krpano will default to "name of krpano SWF".xml, however, this only seems to work when opening the krpano.swf directly. When the krpano is embedded in html via swfobject 1.5 or regular <embed /> the xml does not default to "name of krpano SWF".xml


normally this should work so,
but only when no "xml" or "pano" parameter/variable is set in the html file...

do you have a not working example?

5

Wednesday, March 11th 2009, 12:26am

Sorry, no example online. But I tested it with the fresh file from your download package with the following version:

INFO: krpano 1.0.7
INFO: Flashplayer MAC 9,0,151,0 PlugIn
INFO: registered to: XXX

I embedded via swfobject 1.5 and also tried the regular <embed> way on firefox & safari. Krpano.swf loads the default file fine, if loaded directly (not embedded), but as soon as embedded and no pano variable is supplied, the default xml is not being loaded.

Wicked sowftware package and xml intercface though. Once the last few issues are resolved I will showcase our new player here. Klaus, you made it pretty easy for anybody to look good with this.

Thanks, Ciao.

P

Graydon

Professional

Posts: 614

Location: Texas

Occupation: Industrial gas turbine services.

  • Send private message

6

Wednesday, March 11th 2009, 1:41am

can you copy over the code you are using to embed... that isn't working... as well as which browser you are using... and if there are any error messages shown.... ??

One thing off the top of my head that could cause problems was using a trailing " , " on the last item specified in either the vars, params or attributes... but that only effects IE from what I remember.

7

Wednesday, March 11th 2009, 4:02pm

Here is the embed code

Thanks for the suggestion Graydon, but that doesn't seem to be the case.

Here is one of the code version I tried:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
 <div id="krpano">
            <noscript><table width="100%" height="100%"><tr valign="middle"><td><center>ERROR:<br><br>Javascript not activated<br><br></center></td></tr></table></noscript>
        </div>
	</center>
	<script type="text/javascript" src="swfobject/swfobject.js"></script>
	<script type="text/javascript" src="swfobject/swfkrpanomousewheel.js"></script>
	
	<script type="text/javascript">
    // <![CDATA[
        if (typeof(deconcept) !== 'undefined' && deconcept.SWFObjectUtil.getPlayerVersion().major >= 6)
        {
            var so = new SWFObject("krpano.swf", "krpanoSWFObject", "100%", "100%", "9.0.28","#000000");
            so.addParam("allowFullScreen","true");
            so.addVariable("id", 23);
            so.addVariable("panoId", 40);
            so.useExpressInstall('swfobject/expressinstall.swf');
            so.setAttribute('xiRedirectUrl', window.location);
            if ( so.write("krpano") ) { var mousewheelfixes = new SWFkrpanoMouseWheel(so); }
        }
        else
        {
            document.getElementById("krpano").innerHTML = '<table width="100%" height="100%"><tr valign="middle"><td><center>ERROR:<br><br>Adobe Flash Player 9 needed<br><br><br><a href="http://www.adobe.com/go/getflashplayer/"  target="_blank"><IMG SRC="http://www.macromedia.com/images/shared/download_buttons/get_flash_player.gif" BORDER="1"></a><br>...click here to download...<br><br><br><br></center></td></tr></table>';
        }
    
        function krpano() 
        {
            return document.getElementById("krpanoSWFObject");
        }
        
        function loadpano(xmlname)
        {
            krpano().call("loadpano(" + xmlname + ",null,KEEPVIEW,BLEND(1));");
        }
        
    // ]]>
    </script>


Also, this happens on mac and pc, firefox, safari, ie 6/7, localhost and online. Seems pretty consistent. The only time it works well is, when I call the krpano.swf directly within the browser of flashplayer.

Thanks for all your input,

Ciao.

P

Graydon

Professional

Posts: 614

Location: Texas

Occupation: Industrial gas turbine services.

  • Send private message

8

Wednesday, March 11th 2009, 5:31pm

Have you tried it with these two lines removed?

Source code

1
2
            so.addVariable("id", 23);
            so.addVariable("panoId", 40);


I did a quick test... took out the normal addVariable("pano"... and it worked.

When I put those two lines into it... the swf loaded... but it didn't seem to look for the xml. Maybe those lines are causing an issue somewhere?

9

Wednesday, March 11th 2009, 9:41pm

Will give this a try and keep you guys posted. Thanks for your quick response.
p

10

Wednesday, March 11th 2009, 10:08pm

Hi,

the default XML is only loaded when no parameters are set!

this has a special reason:

it's possible to declare a pano only with parameters and without xml,
e.g.

Source code

1
so.addVariable("qtvr", "pano.mov");

or

Source code

1
so.addVariable("sphere", "pano.jpg");

or in long form with additional parameters:

Source code

1
2
3
4
5
so.addVariable("image.type", "SPHERE");
so.addVariable("image.sphere.url", "pano.jpg");
so.addVariable("image.hfov", "180");
so.addVariable("view.fov", "50");
...


so a default xml is not needed and that's the reason why no xml is loaded

best regards,
Klaus

11

Thursday, March 12th 2009, 7:12pm

Klaus,
Could you manage to offer a solution, where even if you supply parameters, but no xml parameter, krpano.swf is still looking for the default xml?
The reason why I ask is, we have a bunch of 360 Tours embedded on external sites and we would love to perform a silence migration to krpano (from fpp) for all our external 360 Tours. Now we have way too many external integrations, to be contacting each individual user and ask them to update their embed code.

Thanks.
P

Graydon

Professional

Posts: 614

Location: Texas

Occupation: Industrial gas turbine services.

  • Send private message

12

Thursday, March 12th 2009, 8:34pm

could you load your default xml (with no image specified) and then utilize a javascript function call via onload or something similar?

ref - http://www.krpano.com/docu/js/

If you can use js to load specific panos / xmls... then maybe you can use it to load in your two variables after the default xml is loaded? *question*

13

Thursday, March 12th 2009, 8:58pm

Nice idea, but my problem is, that I have a bunch of embedded tours on different external user domains, that already have flashvars specified in their object/embed code. So, as Klaus mentioned (if I understand it right) as soon as a flashvar is set within the embed code, krpano.swf does automatically not look for a default swf file anymore. So unless I find a way to keep a code like this and still have a default xml file loading, I'm srewed...:

Source code

1
2
3
4
5
6
7
8
<object width="450" height="300">
<param name="movie" value="DOMAIN/panoV2.swf"></param>
<param name="allowScriptAccess" value="always"></param>
<param name="bgcolor" value="#1d1d1d"></param>
<param name="allowFullscreen" value="true"></param>
<param name="FlashVars" value="id=33&amp;panoId=61"></param>
<embed src="DOMAIN/panoV2.swf" flashvars="id=33&amp;panoId=61" allowScriptAccess="always"  bgcolor="#1d1d1d" allowFullscreen="true"  width="450" height="300"></embed>
</object>

14

Thursday, March 12th 2009, 9:08pm

Just tried the krprotect that Milo suggested and it worked great unfortunately the krprotect only works with .8beta so I guess I'll have to wait a little while.
Are the any time frames on the .8 release?

Thanks,

P

15

Thursday, March 12th 2009, 10:58pm

I understand, but I also think the only way would be to use the kprotect tool...
changing the default behavior is not possible, I could make a special version,
but that's also not a perfect solution, for every update a special version would be needed too...

16

Friday, March 13th 2009, 9:11pm

How stable is .8 beta

Klaus,
Quick question: How stable is the .8 beta if you only use .7 features in it? The reason I ask is because the krprotect only runs with the .8 beta. And I would like to switch our whole pano library over asap.
Thnaks. Ciao.
P

17

Monday, March 16th 2009, 9:15pm

Hi, if you use just the features from the 1.0.7 and maybe disable the Flash10 usage if it will
be too slow, there should be no problem, just try it

only in the 1.0.8 beta 6, there is one known bug, when a polygonal hotspot will be hidden (set "visible" to "false")
it can't make visible again, but this is fixed in the next beta

Similar threads