How to show intro image in droplet-generated tour

  • Hi,

    I've created a tour using the MAKE VTOUR (NORMAL) droplet. I'd like to add an intro image as in the introimage example contained in the examples folder of the krpano package.

    The example contains the following code:

    <events name="panoevents"
    onloadcomplete="delayedcall(2, if(layer[introimage], hideintroimage() ); ); set(events[panoevents].onloadcomplete,null);"
    />


    <layer name="introimage"
    url="introimage.png"
    align="center"
    onloaded="set(alpha,0); tween(alpha,1.0);"
    onclick="hideintroimage();"
    />

    <action name="hideintroimage">
    if(layer[introimage].enabled,
    set(layer[introimage].enabled,false);
    tween(layer[introimage].alpha, 0.0, 0.5, default, removelayer(introimage));
    );
    </action>

    I've tried adding it to no avail. Should it go in the tour.xml or the vtourskin.xml? I tried both (and made sure the path for the image was relevant). In each case no intro image appeared - but no error message appeared either.

    I appreciate this is very basic stuff, so your patience is appreciated!

    Thanks.

  • hi !
    here is my solution code, i edited the vtourskin.xml file, search for "loading..." text , after that string i added:


    with this code i'm able to load the intro image and hide it with one click on it (tested on desktop, iphone4s & ipad3), and it auto hide after 5 seconds. *smile*

    Edited 3 times, last by Aperol (October 26, 2012 at 11:06 AM).

  • Hi,

    I've tried adding it to no avail. Should it go in the tour.xml or the vtourskin.xml? I tried both (and made sure the path for the image was relevant). In each case no intro image appeared - but no error message appeared either.

    it doesn't matter where - but you need to add keep="true" to the <event> and to the <layer> to avoid that these elements get be removed already at start!

    Note - the first action in tour is to load the first scene - and when doing this, all current elements without keep=true will get removed.

    Best regards,
    Klaus

  • Hello,
    I am using this code from the example to try and show a timed intro image.
    It comes on but stays on - and clicking it does not hide it???
    It works in the example provided??
    Someone has said that keep="true" needs to be added???
    But where????



    <events name="panoevents"

    onloadcomplete="delayedcall(2, if(layer[introimage], hideintroimage() ); ); set(events[panoevents].onloadcomplete,null);"

    />


    <layer name="introimage"

    url="help.png"

    align="center"

    x="0" y="-260"

    scale="1"


    onloaded="set(alpha,0); tween(alpha,1.0);"

    onclick="hideintroimage();"

    />


    <action name="hideintroimage">

    if(layer[introimage].enabled,

    set(layer[introimage].enabled,false);

    tween(layer[introimage].alpha, 0.0, 0.5, default, removelayer(introimage));

    );

    </action>

Participate now!

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