Sie sind nicht angemeldet.

1

Donnerstag, 7. Oktober 2010, 22:53

auto close map

hi!

i have this situation:
i) map in left side of the pano
ii) in the map i have hostpot
iii) when click in the open map, this close

code:

Quellcode

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
<plugin name="map" url="reducidas/la/mapa_LA.png" keep="true"  
	    	align="leftbottom" x="16"  y="16" alpha="0.80" handcursor="false" 
	    	scalechildren="true"
        	width="100" 
        	height="64"
        	onclick="action(openmap);"
        	/>

 <plugin name="scene1" url="marcadorverde.png" keep="true" parent="map" align="lefttop" edge="center" x="350"  y="340" 
 zorder="2" onhover="showtext(Entrada Principal, infostyler);" 	onclick="loadpano(la0.xml, null, MERGE, BLEND(1));" />

 <plugin name="scene2" url="marcadorverde.png" keep="true" parent="map" align="lefttop" edge="center" x="350"  y="236" 
 zorder="2" onhover="showtext(Plaza Central, infostyler);" 	onclick="loadpano(la2.xml, view.hlookat=329, MERGE, BLEND(1));" />

	<action name="closemap">
    	set(onclick,action(openmap););
    	tween(width,100,distance(700,0.5),easeoutquad);
    	tween(height,64,distance(449,0.5),easeoutquad);
	</action>
	
	<action name="openmap">
    	set(onclick,action(closemap););
    	tween(width,700,distance(700,0.5),easeoutquad);
    	tween(height,449,distance(449,0.5),easeoutquad);
	</action>


when load other pano with the map, the map not close automatic.. :(
the user click again in the map and close.

as I can make the map when it loads it closes another pano??

thanks!!

2

Samstag, 9. Oktober 2010, 13:40

Add the closemap() action; something like this

Quellcode

1
2
3
4
5
6
7
8
9
10
11
<plugin name="scene1" 
       	url="marcadorverde.png" 
       	keep="true" 
       	parent="map" 
       	align="lefttop" 
       	edge="center" 
       	x="350"  
       	y="340"   
       	zorder="2" 
       	onhover="showtext(Entrada Principal, infostyler);" 
       	onclick="closemap();loadpano(la0.xml, null, MERGE, BLEND(1));" />