You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Monday, September 7th 2009, 5:54pm

There is a mode to remove/stop a Delayedcall?

Hi!


I'm looking for a way to end the "delayedcall" action, but did not find it ,and reading the forum I think I understand that there are still no effective way to do it.

I tried to use an action based on the "loadpano", "wait" and "oninterrupt", but while "wait" is running I ca't click on the scene or the loading of i'll broke the loading of the next scene...:"
<scene name="scene1"

...

onstart="action(1);" >

...

</scene>


<scene name="scene2"

...

onstart="action(2);" >

...

</scene>



<action name="1">
oninterrupt(action(stopped););
...

wait(5);
loadscene(scene2, null, MERGE,BLEND(2));

wait(5)
</action>
<action name=2">
oninterrupt(action(stopped););

...
wait(5);
loadscene(scene1, null, MERGE,BLEND(2));wait(5)
</action>





<action name="stopped">
break();
...

stopall();
</action>
"




Is there another way in which I can load two scenes, and i can also click inside without breaking the action?

The method by the"dalayedcall" was perfect for my purpose, but I can not find a way to stop it, if you step into another scene.



Thanks to all for the help previously,and sorry for my english *blink*

2

Tuesday, September 8th 2009, 11:06am

Hi,

there is no way to stop the delayedcall() directly,
but it would be possible to use a custom variable and check for it before doing the final action,

e.g.

Source code

1
2
set(delayedcallkilled,false);
delayedcall(10, if(delayedcallkilled== false, action(do_something) ) );


to stop the delayedcall just set the variable "delayedcallkilled" to true:

Source code

1
set(delayedcallkilled,true);


best regards,
Klaus

3

Thursday, September 10th 2009, 10:26am

Thanks for the fast response Klaus *smile* .



I tried as you told me, but unfortunately it seems not work ... *confused* .

Here is an example that i have tried:
"

<scene name="scene1" onstart="action(donald1)>"

...

<scene/>



<scene name="scene2" onstart="action(donald2)>"

...

<scene/>





action name="donald1">
set(delayedcallstop,false);
delayedcall(10,if(delayedcallstop==false, action(pano2) ) );
</action>



action name="donald2">
set(delayedcallstop,false);
delayedcall(10,if(delayedcallstop==false, action(pano1) ) );
</action>



<action name="pano1">
loadscene(scene1, null, MERGE,BLEND(2));
</action>



<action name="pano2">
loadscene(scene2, null, MERGE,BLEND(2));
</action>

"

...but in this way don't work....




I also tried to make a single call to action, to vary the action in various ways but it seems not work btw...
Forgive the ignorance, could you enlighten me on this? *love*

4

Thursday, September 10th 2009, 10:29am

Hi,

where do you change the "delayedcallstop" variable?

e.g. you could use the click event for this:

Source code

1
<events onclick="set(delayedcallstop,true);" />


best regards,
Klaus

5

Thursday, September 10th 2009, 11:43am

Oh sorry I don't put the string for "delayedcall, true", but is not it that don't work.

Il the delayed call that don't work, i try to explane me better:

if i use:



<action name="donald1">
set(delayedcallstop,false);
delayedcall(10, action(s2) );
</action>



the delayedcall run,and load after 10 seconds the panoscene2.



But if i write:



<action name="donald1">
set(delayedcallstop,false);
delayedcall(10,if(delayedcallstop==false, action(s2) ) );

</action>



the delayedcall don't run.

This post has been edited 1 times, last edit by "Corsifo" (Sep 10th 2009, 12:15pm)


6

Monday, September 14th 2009, 11:16pm

Hi,

hmm, strange,
which krpano version do you use? (build?)

best regards,
Klaus

7

Tuesday, September 22nd 2009, 6:23pm

I was trying with the krpano 1.0.8 beta 7 version and doesn't run.
But with your last answer, i have tried with the krpano 1.0.8 beta 8, and it work!

Thanks a lot for your help Klaus, you're the best!