You are not logged in.

Agencia

Beginner

  • "Agencia" started this thread

Posts: 1

Location: Japan

Occupation: Web Developer

  • Send private message

1

Tuesday, July 8th 2014, 10:56am

intro image (Urgent)

Could somebody please tell me how can I make a INTRO using 3 images fade in an out.


Eg. introimage1.png, introimage2.png, introimage3.png



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


<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>

Umalo

Professional

Posts: 1,051

Location: Osijek, Croatia, EU

  • Send private message

2

Thursday, July 10th 2014, 9:39pm

Try this:

Source code

1
2
3
4
<events name="panoevents" keep="true" 
			onloadcomplete="delayedcall(1,animate_introimages(););set(events[panoevents].onloadcomplete,null);"
			onremovepano="stopdelayedcall(introimage);"
	/>

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<layer name="introimage_1" align="center"	url="info/info_1.png" keep="true"	alpha="0"	scale="1"	handcursor="true" x="0" y="0" zorder="8" onhover="" autoalpha="true" onclick="hideintroimages();"/>		
	<layer name="introimage_2" align="center"	url="info/info_2.png" keep="true"	alpha="0"	scale="1"	handcursor="true" x="0" y="0" zorder="8" onhover="" autoalpha="true" onclick="hideintroimages();"/>		
	<layer name="introimage_3" align="center"	url="info/info_3.png" keep="true"	alpha="0"	scale="1"	handcursor="true" x="0" y="0" zorder="8" onhover="" autoalpha="true" onclick="hideintroimages();"/>	
	
	<action name="animate_introimages">
		delayedcall(introimage_1_show,1,set(layer[introimage_1].visible,true);tween(layer[introimage_1].alpha,1,1,default,delayedcall(4,tween(layer[introimage_1].alpha,0,1));););							
		delayedcall(introimage_2_show,7,set(layer[introimage_2].visible,true);tween(layer[introimage_2].alpha,1,1,default,delayedcall(4,tween(layer[introimage_2].alpha,0,1));););
		delayedcall(introimage_3_show,13,set(layer[introimage_3].visible,true);tween(layer[introimage_3].alpha,1,1,default,delayedcall(4,tween(layer[introimage_3].alpha,0,1));););				
		delayedcall(introimage_end,19,hideintroimages(););
	</action>
	
	<action name="hideintroimages">	
		stopdelayedcall(introimage_1_show);
		stopdelayedcall(introimage_2_show);
		stopdelayedcall(introimage_3_show);
		stopdelayedcall(introimage_end);
			
		tween(layer[introimage_1].alpha, 0.0, 1, default,removelayer(introimage_1););		
		tween(layer[introimage_2].alpha, 0.0, 1, default,removelayer(introimage_2););		
		tween(layer[introimage_3].alpha, 0.0, 1, default,removelayer(introimage_3););			
	</action>


Link to online example: Link
Code you can see: Here

Similar threads