You are not logged in.

1

Wednesday, September 7th 2016, 6:20am

anybody know break() action?

when call xx()

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<action name="xx">
	set(j,0);
	for(set(i,0),i LT 2,inc(i),
        if(i == 1,break();trace('man'););
          
        copy(l,i);
        trace(get(l));  
        set(l,2);
        trace(get(l)); 
        if(stagewidth GT stageheight,trace('women'));
        set(l,3);
        trace(get(l)); 
         
        );
     trace(get(j));   

</action>


get

Source code

1
2
3
4
5
6
7
8
INFO: 0
INFO: 2 
INFO: women 
INFO: 3 
INFO: 1 
INFO: 2 
INFO: 3 
INFO: 0


when i == 1,can not trace'man'
but the loop continue,

output 1 2 3

But the strange thing is that can not execute some action like
if
for
& any custom action

in this example,
if(stagewidth GT stageheight,trace('women'));
did not be execute when i == 1


1.19 pr6

2

Wednesday, September 7th 2016, 8:50am

Source code

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
26
27
28
29
30
31
32
<krpano onstart="yy();xx();zz();">
 
	<preview type="grid(CUBE,16,16,512,0xCCCCCC,0xFFFFFF,0x999999);"/>
 
	

<action name="yy">

 trace(5);  
 break();
 trace(6);  
 
</action>


<action name="xx">

 trace(7);  

</action>


<action name="zz">

 trace(5);  
 break();
 trace(6);  

</action>

 
</krpano>



get 5



Source code

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
26
27
28
29
30
31
32
<krpano onstart="yy();set(i,7);trace(get(i));zz();">
 
	<preview type="grid(CUBE,16,16,512,0xCCCCCC,0xFFFFFF,0x999999);"/>
 
	

<action name="yy">

 trace(5);  
 break();
 trace(6);  
 
</action>


<action name="xx">

 trace(7);  

</action>


<action name="zz">

 trace(5);  
 break();
 trace(6);  

</action>

 
</krpano>


get 5 7


*question* why??

Similar threads