[virtual tour] Load a specific scene at startup

  • Hello,

    I recently upgraded my krpano licence. The code below used to work when I didn't want to start with the first scene in the tour.xml. But it doesn't anymore, it always starts at the first scene of my xml. I looked on the web and the doc, I'm sure I miss an obvious thing, but after different tries I can't manage to choose my first scene. If somebody could help me that would be great :)

        <action name="startup" autorun="onstart">
    		if(startscene === null OR !scene[get(startscene)], copy(startscene,scene[0].name); );
    		loadscene(THE_SCENE_I_WANT), null, MERGE);
    		if(startactions !== null, startactions() );
  • Hi,

    that's independent of the krpano viewer version ,but depends on what version of vtourskin.xml you use.

    E.g. in the current vtourskin.xml (version 1.21) the startup scene loading is done the in the vtourskin.xml in this action:

    That means with this version, no startscene loading the tour.xml wouldn't required.

    Additionally it would be important that in the html file, the passQueryParameters setting includes "startscene", otherwise this url-query wouldn't be passed into the viewer:

    krpano.com - Documentation - Embedding into HTML

    Best regards,

  • Me again :/

    I guess it's because of the new way of vtourskin dealing with loadscene but this part of code used to work but doesn't anymore.

        <action name="mouse_click" scope="global">
            calc(scene_nbr_var, substr(scene_nbr,6));
            calc(scene_nbr_var1, 3 + scene_nbr_var);
            loadscene(*scene_nbr_var1, null, KEEPVIEW, BLEND(0.1));

    If I trace scene_nbr_var1 the value is ok, krpano loads the good scene but the second after it loads another one. The reason I have a "+3" is because I have videos on the beginning of the xml scenes and I don't want them to be loaded automaticly, but now krpano loads the good scene then the second after it plays the video.

  • I couldn't explain why but after removing the piece of code below which I didn't have in older version, things seem to work :)

    It's in the new vtourskin at the "skin_hotspotstyle_click"

    				tween(caller.depth|caller.alpha|caller.oy|caller.rx, 4000|0.0|-50|-60, 0.5, default,

Participate now!

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