You are not logged in.

ramirox3

Intermediate

  • "ramirox3" started this thread

Posts: 354

Location: La Ceja, Colombia

Occupation: photographer

  • Send private message

1

Wednesday, June 22nd 2016, 2:30pm

trouble with intro image

Hi, I need your help
I'm using image intro 100% of the screen. I want this image to be displayed for a few seconds before displaying the pano. But first shown briefly, the pano, then the intro image and again the scene. as I can avoid that instant that initially displays the scene?

<events name="panoevents"
onxmlcomplete="delayedcall(introimage, 4.0, if(layer[introimage], hideintroimage() ); ); set(events[panoevents].onloadcomplete,null);
"
onremovepano="stopdelayedcall(introimage);" keep="true"
/>

<layer name="introimage"
zorder="20"
url="intro3.jpg"
devices="all"
align="center" width="112%" height="prop"
keep="true"
visible="true"
onclick="hideintroimage();"
onloaded="set(alpha,0); tween(alpha,1.0);"

/>

<action name="hideintroimage">
tween(layer[introimage].);
tween(layer[introimage].scale.normal,1);
tween(layer[introimage].scale.mobile,0.3);
tween(layer[introimage].alpha,0,1);
set(layer[introimage].enabled, false);
/> keep="true"
</action>

http://www.ciudadcubica.com/pdb/

This post has been edited 1 times, last edit by "ramirox3" (Jun 22nd 2016, 2:41pm)


2

Wednesday, June 29th 2016, 11:53am

Add preload="true" to the introimage.

ramirox3

Intermediate

  • "ramirox3" started this thread

Posts: 354

Location: La Ceja, Colombia

Occupation: photographer

  • Send private message

3

Wednesday, June 29th 2016, 4:47pm

This solution does not work

4

Wednesday, June 29th 2016, 5:08pm

Hi,

right, there seems to be problem with preload in the html5 version... I will check this.

But you could also just load the image and then in the onloaded event of the introimage call the loading of the first pano scene. That means remove the default 'startup' action.

Best regards,
Klaus

ramirox3

Intermediate

  • "ramirox3" started this thread

Posts: 354

Location: La Ceja, Colombia

Occupation: photographer

  • Send private message

5

Wednesday, June 29th 2016, 5:46pm

I have tried all possibilities, but it does not load the scene

6

Wednesday, June 29th 2016, 5:54pm

Take that whole part of your tour.xml:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!-- startup action - load the first scene -->
	<action name="startup" autorun="onstart">
		if(startscene === null OR !scene[get(startscene)], copy(startscene,scene[0].name); );
		loadscene(get(startscene), null, MERGE);
		if(startactions !== null, startactions() );
	</action>

<events name="panoevents" 
	        onloadcomplete="delayedcall(introimage, 4.0, if(layer[introimage], hideintroimage() ); ); set(events[panoevents].onloadcomplete,null);
			" 
	        onremovepano="stopdelayedcall(introimage);" keep="true" 
	        />
			
			<layer name="introimage"
         zorder="20"
        url="intro3.jpg"
		devices="all"
		align="center" width="112%" height="prop" 
        keep="true"
		preload="true"
         visible="true"
        onclick="hideintroimage();"
         onloaded="set(alpha,0); tween(alpha,1.0);"
		
         />
		 
		  <action name="hideintroimage">
    tween(layer[introimage].);
	tween(layer[introimage].scale.normal,1);
	tween(layer[introimage].scale.mobile,0.3);
	tween(layer[introimage].alpha,0,1);
    set(layer[introimage].enabled, false);
    /> keep="true" 
  </action>


and fully replace it with that:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
<layer name="introimage" keep="true"
       url="intro3.jpg"
       align="center" width="112%" height="prop" zorder="1000"
       onloaded="loadscene(0, null, MERGE); delayedcall(4, hideintroimage() );"
       onclick="hideintroimage();"
       />

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

ramirox3

Intermediate

  • "ramirox3" started this thread

Posts: 354

Location: La Ceja, Colombia

Occupation: photographer

  • Send private message

7

Wednesday, June 29th 2016, 7:39pm

Works fine in opera, in firefox shows first briefly the pano, and then introimage, in chrome opens first the pano and then the intro image as deploying a curtain
http://www.ciudadcubica.com/pdb/
The link is apdated

This post has been edited 1 times, last edit by "ramirox3" (Jun 29th 2016, 11:47pm)