You are not logged in.

1

Thursday, October 25th 2012, 5:18am

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.

2

Friday, October 26th 2012, 10:50am

re

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


Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
       <!--************** Plugin e dati di KrPano **************************************************-->
    <plugin name="data" firstPanoHasBeenPlayed="false" introImageHasBeenPlayed="false" soundOn="true" keep="true"/>

	<!--************** Intro Image ***************************************************************-->
    <plugin name="introimage" keep="true" url="introimage.png " align="center" onclick="hideintroimage();" onloaded="autohideintroimage();"/>
    <action name="hideintroimage">
		if(plugin[introimage].enabled,	set(plugin[introimage].enabled,false);tween(plugin[introimage].alpha, 0.0, 0.5, default, removeplugin(introimage)););
	</action>
    <action name="autohideintroimage">
		if(plugin[data].introImageHasBeenPlayed==false, 	set(plugin[introimage].alpha,0); tween(plugin[introimage].alpha,1.0,WAIT);
		delayedcall(5, hideintroimage() ); 
		set(plugin[data].introImageHasBeenPlayed,true););
	</action>
	<!--************** Intro Image ***************************************************************-->


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*

This post has been edited 3 times, last edit by "Aperol" (Oct 26th 2012, 11:06am)


3

Tuesday, October 30th 2012, 9:32am

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

4

Wednesday, October 31st 2012, 4:11am

Thanks to you both for replying, it's appreciated. I'll try it out later!

5

Sunday, November 11th 2012, 4:12pm

Intro image not working

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>