Hi,
I'm using the AUTOTOUR Event into my project and I'd like to add a Button that could switch the AUTOTOUR.
Here is my code :
Code
<!-- Mise en place Swith Automatique des Scènes -->
<events name="autotour" keep="true"
autotour="
add(sceneindex,scene[get(xml.scene)].index,1);
if(sceneindex == scene.count, set(sceneindex,0); );
loadscene(get(sceneindex),null,merge,blend(0.7));"/>
<!-- layer pour afficher l'icone de la navigation automatique -->
<layer name="autotourOn" url="images/autorotate.png" align="rightbottom" x="210" y="90" keep="true" zorder="-1" onhover="showtext(Visite Manuelle, info-bulle);" onclick="delayedcall(0.1,autotour.pause();)"/>
<!-- layer pour afficher l'icone de la navigation automatique -->
<layer name="autotourOff" url="images/autorotate.png" align="rightbottom" x="270" y="90" keep="true" zorder="-1" onhover="showtext(Visite Automatique, info-bulle);" onclick="delayedcall(0.1,autotour.reset();)"/>
Display More
As you can see, for the moment I have 2 buttons :
1 : Autotour is On
2 : Autotour is OFF
I'd like to have only One button that could swith ON/OFF the Autotour.
I know that there is "switch" option, but how to implement it ?
Thanks for your help.