Sie sind nicht angemeldet.

1

Montag, 16. Februar 2009, 21:45

Anchors

Is there a way to set anchors for a bunch of panos in one XML file?

For example, if I have a virtual tour with 6 panos and want to start off on the 2nd pano, then I would link the page like this:

Quellcode

1
http://www.yoursite.com/krpano.html#pano2

Is this configurable somehow or does it require a plugin or will it be a feature for the future ?

Graydon

Profi

Beiträge: 614

Wohnort: Texas

Beruf: Industrial gas turbine services.

  • Nachricht senden

2

Dienstag, 17. Februar 2009, 02:46

If you are using swfobject 2.1 then you can do this...

read this here... http://code.google.com/p/swfobject/wiki/api

look down at this section... swfobject.getQueryParamValue(paramStr)


you'd want to do this and pass the xml file info to the flash var "pano".

Or, if you had a default xml file that you wanted to use, you could pass the flash var specific to the image file(s) you wanted to load.

There might be other / better / different ways of doing this... but since swfobject is there, it's an option.

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Graydon« (17. Februar 2009, 03:26)


3

Mittwoch, 18. Februar 2009, 10:20

Hi,

I'm not sure about "Anchors", but it would be possible to pass parameters via the HTTP-Get Syntax,
and redirect these parameters to the flash, have a look at the source of the http://krpano.com/krpano.html

e.g. in this way:

Quellcode

1
krpano.html?pano=pano2.xml


best regards,
Klaus

Graydon

Profi

Beiträge: 614

Wohnort: Texas

Beruf: Industrial gas turbine services.

  • Nachricht senden

5

Mittwoch, 18. Februar 2009, 23:37

when you open the link, view the source for the page.

It's not working because there is no pano specified in the url as given... but you can still see the source of the page to see how the flash var pano is setup.

6

Donnerstag, 19. Februar 2009, 00:50

But using krpano.html?pano=pano2.xml would still load the page again. It would be best if it was an Anchor Link so that the page doesn't refresh. And the link displaying the 2nd pano can be copied as the URL by the user so they can go back to the page at a later date directly to pano2 instead of loading pano1 first. Hopefully that makes sense.

Graydon

Profi

Beiträge: 614

Wohnort: Texas

Beruf: Industrial gas turbine services.

  • Nachricht senden

7

Donnerstag, 19. Februar 2009, 01:58

Just to see if I'm following your idea... I think you are talking about a user experience where the visitor / user...

-visits site/tour that starts of with pano1.xml
-interacts with the tour and is looking at pano4.xml
-decides to bookmark the location (at pano4.xml)
-leaves / goes on / does whatever
-comes back via bookmark that takes them directly to pano4.xml

You don't want to use the ?pano=pano4.xml format... because between each pano you would have to reload the page. Understandable from a user experience issue as well as xml structure if you have complex interfaces, plugins, etc.

The concept of an anchor is interesting... but for it to work in the scenario presented, flash would need to be able to rewrite the url when a new pano / xml file is loaded.... which I'm not the right person to even know if that's possible. Since krpano can access javascript functions defined in the html page, you could see if javascript has a way of rewriting the url... without a page refresh.

One possible, but probably not desireable, option would be to setup a "share link" button for each xml using the textfield plugin. When clicked, it would open a textfield with a useable link to that specific pano using the ?pano=whatever.xml format... and the user would have to copy and paste it as needed.

Only other thing I can think of would be to find /create a swf app that was a "share this" button that could be fed parameters somehow as a plugin.

Graydon

8

Donnerstag, 19. Februar 2009, 20:52

The concept of an anchor is interesting... but for it to work in the scenario presented, flash would need to be able to rewrite the url when a new pano / xml file is loaded.... which I'm not the right person to even know if that's possible. Since krpano can access javascript functions defined in the html page, you could see if javascript has a way of rewriting the url... without a page refresh.
re-writing the "url" with Javascript should be possible,
but I also don't have any experience with that...

9

Donnerstag, 19. Februar 2009, 21:44

Thanks for the input Graydon.

Also have a look here: http://www.adobe.com/devnet/flash/articles/deep_linking.html

The part where they mention my_home_page.html#about_us with each "section" having an anchor. What I was getting at would be similar to that, but each "section" would be the XML file or a anchor name instead. So the visitor would see the URL change but the page never refreshes; which then they can copy the URL / link easily from the Address Bar to share with others instead of using a textfield plugin like Graydon had mentioned.