Updating my website and drying code help needed ^^

  • Hi all ^^
    I'm making a V2 of my website and I want to make clearer the way I embed my panos in it.
    Actually each tour I have in demo has it's own tour.swf and swfkrpano.js, and is embeded has follow:

    What I want to do, is create an unike krpano.swf and swfkrpano.js in a krpano folder, than in my scripts load the wanted xml
    for the tour I want to show.
    Like this:
    general folder
    | |
    krpano folder tour folder
    | |
    Krpano.swf+swfKrpano.js mytour1 folder | mytour2 folder | mytour3 folder...

    Here is what I've done:


    It's not loading well the tour images for example.
    Anyone knows the best way to do it ?
    Maybe Klaus *wink*
    Thanks in advance !!

  • Okay Hi again !
    For this tour I'm using the 720 blend pano, I think the problem goes here:


    The problem comes from the paths...
    How can I edit the path here to solve it ?
    Thanks again ^^
    Best regards.

  • Hi Klaus !
    Thank you for replying ^^
    Here's a diagram of what I aim to do.(Morever if you have a better way I'm open ^^)

    I managed to run tour1 for example, but as soon as I use variables in the xml path,
    the paths to the tiles or graphics isn't good...
    Also I had to put the "tours" folder in the "Krpano" folder...
    In the case of this tour for example:

    Code
    <action name="addcube">
    		addface(face_%1_F, %1_f.jpg,    0,   0);
    		addface(face_%1_L, %1_l.jpg,  -90,   0);
    		addface(face_%1_R, %1_r.jpg,  +90,   0);
    		addface(face_%1_B, %1_b.jpg, +180,   0);
    		addface(face_%1_Z, %1_u.jpg,    0, -90);
    		addface(face_%1_N, %1_d.jpg,    0, +90);
    	</action>


    I used here the blend tour example found on the forum, but the links to the tiles isn't good.
    In the original tour the tiles was in the root krpano folder.
    But I want to dry all that ^^
    Thanks for your help !

    PS : Also using a lightbox to show the tours, I'd rather if you know a way to pass more than one variable
    in the html path?
    Like this :

    Code
    <a  href="tour/krpano/krpano.swf?tour1/flash_tour.xml%lightbox[width]=700&amp;lightbox[height]=400">click here</a>


    Thanks again !!
    Best ragards.
    Yoann.

  • Hi,

    paths in the xml that were defined per "url" attribute will be automatically adjusted by krpano so that they were relative to the xml where they were defined,

    but when using/setting paths dynamically per action this is not possible, these paths are relative to the basedir, which is %FIRSTXML% by default,

    you could either change the basedir variable and/or use path placeholders in the dynamic url,

    see here:
    https://krpano.com/docu/xml/#url-notes

    best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!