Hello,
I have a panorama with a map and i would like to decrease the size of this map When i load a new scene.
Hère is thé adresse of thé panorama:
http://www.boris-joseph.com/panostest/vtour/tour.html
Thank you.
Regards.
Boris
Close map when i load a scene...
-
-
where ever you have you onclick action to load a new scene add this. tween(plugin[googlemap].scale, 0.25); switch out the name of 'googlemap' to whatever you called your map.
-
Hello,
Thank you for this answer. It is working but the problem is that at the next scene when I want to open the map again it not increase but decrease.
You can see the panoram at this adress:
http://www.boris-joseph.com/panostest/vtour/tour.html
Thank you again for your help.
Regards.
Boris. -
try this replace you map code with this code.
<plugin name="map" url="planexemple.gif"
align="righttop"
x="10" y="10"
keep="true"
alpha="0.85"
handcursor="false"
scalechildren="true"
width="320"
height="227"
onover="openmap();"
onout="closemap();"
onclick="closemap();"/>change your actions to this.
<action name="closemap">tween(plugin[map].scale, 0.25); tween(plugin[map].alpha, 0.25);</action>
<action name="openmap">tween(plugin[map].scale, 1); tween(plugin[map].alpha, 0.85);</</action>this will fade and scale the map accordingly.
-
Hello,
Thank you for your answer. It is working on desktop computer. But do you have a solution for Ipad without rollover?
Sorry to ask again but I am not used to work with code.
Thank you.
Regards.
Boris. -
<plugin name="map" url="planexemple.gif"
align="righttop"
x="10" y="10"
keep="true"
alpha="0.85"
handcursor="false"
scalechildren="true"
width="320"
height="227"
switch="0"
onover="openmap();"
onout="closemap();"
onclick="IF(switch == 0, openmap(), closemap()); ><action name="openmap">tween(plugin[map].scale, 1); tween(plugin[map].alpha, 0.85); set(plugin[map].switch, 1);</action>
<action name="closemap">tween(plugin[map].scale, 0.25); tween(plugin[map].alpha, 0.25); set(plugin[map].switch, 0);</action> -
He VN,
can you explain this part..
switch="0"
onover="openmap();"
onout="closemap();"
onclick="IF(switch == 0, openmap(), closemap()); >
Thanx
Tuur
-
switch="0" - is just a variable for the IF action to comare against.
onover="openmap();" - this would be an action that works with your mouse on a PC it will have no effect on touch screen devices. opens the map without clicking
onout="closemap();" - this the opposite of above
onclick="IF(switch == 0, openmap(), closemap()); - this will toggle the clicks. and is a way to oepn and close the map by clicking the same icon. which will allow the map to be opened and closed on mobile devices that do not know about onover and onout.the first click the IF statements checks the state of switch it is 0 so it will run the action openmap(). notice that the action open map when run sets the switch="1", the next time it is clicked it checks the state of 'switch' which is now 1 because openmap set it to 1. since it is now 1 switch does not equal 0 anymore and will now run the second action closemap() which will in turn set 'switch' back to 0 so the next time it is clicked it will reopen the map.
<action name="openmap">tween(plugin[map].scale, 1); tween(plugin[map].alpha, 0.85); set(plugin[map].switch, 1);</action>
<action name="closemap">tween(plugin[map].scale, 0.25); tween(plugin[map].alpha, 0.25); set(plugin[map].switch, 0);</action> -
ah oke
smart!!
didn't use it this way before..
Thanx
Tuur
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!