Sie sind nicht angemeldet.

1

Donnerstag, 24. November 2011, 12:48

Self move steps

Please I made a plugin to look around and load some panos , I just want to know what I have to do to:
1 when I move the mouse stops this action
2 if I leave the mouse idle for more than 5 seconds the action begins again.
Can I make it? Is it possible?
Thank you everybody

2

Donnerstag, 24. November 2011, 12:55

Hi,

yes it's possible. Here is short example code how to do it:

<krpano version="1.0.8.14" onstart="action(setuptour);>



<action name="setuptour">
set(step,1);
set(idletime,4);
set(events.onidle,action(autotour) );
</action>


<action name="autotour">
oninterrupt(break);
if(step == 1, lookto(50,0,90,smooth(3,-3,10)); inc(step); );
if(step == 2, wait(1); inc(step); );
if(step == 3, lookto(-30,0,90,smooth(3,-3,10)); inc(step); );
if(step == 4, wait(1); inc(step); );
if(step == 5, loadpano(intro1.xml,null,MERGE,BLEND(1)); );

...

if(step == 10, tourdone(); set(step,1); );
</action>

So basically onstart it set the action to start the autotour. Idletime is the time tour wait before autotour takes control. When you interfere it with mouse, it will stop but continue from the step it was left. You can modify the steps actions as you wish, example to look on hotspot and then load panorama to go there.

Hope this helps :)

Regards,
Jesse Passoja
Passoja design
www.passojadesign.com

3

Freitag, 25. November 2011, 20:56

Thank you very much. Take a look on this link http://www.airpano.ru/files/Manhattan-Ne…SA/start_e.html
What about this action?
Thank you

Ähnliche Themen