auto slide show feature

  • Hello

    I'm trying to do an auto slide show feature for panoramas.
    I have a set of panoramas like this one http://dp-studio.com/virtualtours/. When it loads the first panorama, I want it to rotate for a while than load the second panorama, on and on.
    I did see some example but did not get the code.
    I ask the same question before and did get answers but due to my limit knowledge in coding and xml, I didn't get it to work.

    Any tips would be very appreciated.
    Thanks.

    Vasin

  • krpano onstart="bombtimer(0); "

    <action name="bombtimer">
    set(bt,%1);
    add(bt,1);
    delayedcall(1, bombtimer(get(bt)));
    if(bt == 80, startmanualcontrol(); stopall(); set(bt,0); nextscene();, );
    </action>

    <action name="nextscene">
    set(ns, get(scene[get(xml.scene)].index) );
    set(maxs, get(scene.count) );
    add(ns,1);
    if(ns == maxs, set(ns,0);, );
    loadscene( get(scene[get(ns)].name ), null, MERGE, BLEND(1.5) );
    </action>

  • Thank you Mindlessboss

    I'm sorry for the late reply.

    I tried putting the code in the xml, but nothing happen. I don't know any coding, so I don't know what value to put. Please take a look at it again and tell me what I've done wrong.

    Thank you
    Vasin

    here is the link to the VR
    and link to xml


    <scene name="scene_yamaha motor show2" title="yamaha motor show2" onstart="" thumburl="yamaha motor show2.tiles/thumb.jpg">

    <view hlookat="0" vlookat="0" fovtype="MFOV" fov="90" maxpixelzoom="2.0" fovmin="60" fovmax="120" />

    <preview url="yamaha motor show2.tiles/preview.jpg" />

    <image type="CUBE" multires="true" tilesize="955" progressive="false">
    <level tiledimagewidth="1910" tiledimageheight="1910">
    <left url="yamaha motor show2.tiles/l2_l_%0v%0h.jpg" />
    <front url="yamaha motor show2.tiles/l2_f_%0v%0h.jpg" />
    <right url="yamaha motor show2.tiles/l2_r_%0v%0h.jpg" />
    <back url="yamaha motor show2.tiles/l2_b_%0v%0h.jpg" />
    <up url="yamaha motor show2.tiles/l2_u_%0v%0h.jpg" />
    <down url="yamaha motor show2.tiles/l2_d_%0v%0h.jpg" />
    </level>
    <level tiledimagewidth="955" tiledimageheight="955">
    <left url="yamaha motor show2.tiles/l1_l_%0v%0h.jpg" />
    <front url="yamaha motor show2.tiles/l1_f_%0v%0h.jpg" />
    <right url="yamaha motor show2.tiles/l1_r_%0v%0h.jpg" />
    <back url="yamaha motor show2.tiles/l1_b_%0v%0h.jpg" />
    <up url="yamaha motor show2.tiles/l1_u_%0v%0h.jpg" />
    <down url="yamaha motor show2.tiles/l1_d_%0v%0h.jpg" />
    </level>
    <mobile>
    <left url="yamaha motor show2.tiles/mobile_l.jpg" />
    <front url="yamaha motor show2.tiles/mobile_f.jpg" />
    <right url="yamaha motor show2.tiles/mobile_r.jpg" />
    <back url="yamaha motor show2.tiles/mobile_b.jpg" />
    <up url="yamaha motor show2.tiles/mobile_u.jpg" />
    <down url="yamaha motor show2.tiles/mobile_d.jpg" />
    </mobile>
    <tablet>
    <left url="yamaha motor show2.tiles/tablet_l.jpg" />
    <front url="yamaha motor show2.tiles/tablet_f.jpg" />
    <right url="yamaha motor show2.tiles/tablet_r.jpg" />
    <back url="yamaha motor show2.tiles/tablet_b.jpg" />
    <up url="yamaha motor show2.tiles/tablet_u.jpg" />
    <down url="yamaha motor show2.tiles/tablet_d.jpg" />
    </tablet>
    </image>


    <plugin name="logo"
    url="dp.png"
    align="topright"
    x="10"
    y="10"
    onclick="openurl('http://dp-studio.com');"
    />

    <plugin name="text"
    url="img/yamaha-motor-show2.png"
    align="topleft"
    x="10"
    y="10"
    onclick="openurl('http://dp-studio.com');"
    />

    <!-- place hotspots here -->

    <!-- example hotspot:
    <hotspot name="spot1" style="hotspot_ani_black"
    ath="0"
    atv="0"
    zoom="false"
    onclick="looktohotspot(get(name)); loadscene('insert-scene-name',null,MERGE,BLEND(1));"
    />
    -->

    </scene>


    krpano onstart="bombtimer(0); "

    <action name="bombtimer">
    set(bt,%1);
    add(bt,1);
    delayedcall(1, bombtimer(get(bt)));
    if(bt == 80, startmanualcontrol(); stopall(); set(bt,0); nextscene();, );
    </action>

    <action name="nextscene">
    set(ns, get(scene[get(xml.scene)].index) );
    set(maxs, get(scene.count) );
    add(ns,1);
    if(ns == maxs, set(ns,0);, );
    loadscene( get(scene[get(ns)].name ), null, MERGE, BLEND(1.5) );
    </action>

Participate now!

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