Changing Default Load Pano on the Fly

  • I have a pano project with 4 panos within. I would like to call the Pano Project and during the call pass via the HTML which pano would be the default pano to view. Is this possible?
    I am using Kolor to generate the HTML and XML files. I would like to setup different HTML files that load a different default pano for that HTML page but yet still show all 4 panos but only change the default load pano.

    Hopfully this makes sense. Thank you in advance for your help. *smile*

  • Normally you would do:

    Code
    <script>
      var viewer = createPanoViewer({swf:"krpano.swf",target:"panocontent"});
      viewer.addVariable("xml", "virtualtour2.xml");
      viewer.embed();
    </script>

    The problem with Kolor is, they include virtualtour.xml which holds the default settings, which includes the photo (virtualtour1.xml for example)

    But if you edit virtualtour.xml, and change:

    Code
    <include url="virtualtour1.xml" />

    to

    Code
    <include url="%$startup%" />

    and in the html you change the embed script to this:

    Code
    <script>
      var viewer = createPanoViewer({swf:"krpano.swf",target:"panocontent"});
      viewer.addVariable("startup", "virtualtour2.xml");
      viewer.embed();
    </script>

    it should work.

    Otherwise, use method 1, and include virtualtour.xml in every photo xml.

  • I've tried a couple of different options however all I get is a blank view.
    And still not sure why. When I create viewer how does it know to atached the the embedpano?

    Code
    <!--************** Open the first pano ********************************************************-->
        <!--*** <include url="LLBean100Year0.xml"/> -->
        <include url="%$startup%"/>
        <autorotate enabled="false"/>
  • Kolor uses the object tag to place krpano (which is in my opinion bad, and they should rely on swfobject)

    replace this

    Code
    <script>
              embedpano({target:"panoDIV",swf:"LLBean100Year.swf",wmode:"transparent"});
            </script>

    with this:

    Code
    <script>
       var viewer = createPanoViewer({swf:"LLBean100Year.swf",target:"panoDIV", ,wmode:"transparent"});
       viewer.addVariable("startup", "LLBean100Year0.xml");
       viewer.embed();
    </script>

    Here's a simpler html file, if you run into troubles:

  • Well, I'm getting closer. Now at least I'm getting and error. Its like it doesn't recognize the variable name.

    FATAL: %$startup% - loading error (IO Error)


    Code
    <!--************** Open the first pano ********************************************************-->
    	<!--*** <include url="LLBean100Year0.xml"/> -->
    	<include url="%$startup%"/>
    	<autorotate enabled="false"/>
  • Hmm, there seems to be a bug (or hidden option) with the swf provided by Pano tour pro. Mine doesnt work either, but if I copy a clean krpano.swf from the download page it works. Try that, or look for an option in pano tour pro called something like "disable external parameters"

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!