Hello everybody I am novice with Krpan would like help from you.
Sometimes I have a huge menu with more than 15 or 30 options.
For the construction of it I use the following code:
Code
<action name="fillcombobox">plugin[combobox].removeall();additem('Varanda Foto 1', action(moveto1); );additem('Piscina Foto 02', action(moveto............
<action name="moveto1"> action(startloading); loadpano(1.xml,null,KEEPALL,BLEND(2)); lookat(-18,0,90); wait(blend); oninterrupt(action(lookinterrupt)); action(loadingdone); set(plugin[titre].html,); set(plugin[text].html,); set(plugin[foto_box].url,%SWFPATH%/img/img1.png); txtadd(plugin[titre].html, 'data:tt1'); txtadd(plugin[text].html, 'data:ttx1');
</action>
<action name="moveto................
As can be seen he repeats the same value moveto # 6 times. I wantedto reduce this action with a command like this one. Or any othereffectively.
Code
menu1=Varanda Foto 1
i=0do while i < 39 i=i+1 additem('menu1', action(moveto+i); ); <action name="moveto+i"> action(startloading); loadpano(i.xml,null,KEEPALL,BLEND(2)); lookat(-18,0,90); wait(blend); oninterrupt(action(lookinterrupt)); action(loadingdone); set(plugin[titre].html,); set(plugin[text].html,); set(plugin[foto_box].url,%SWFPATH%/img/img+i+.png); txtadd(plugin[titre].html, 'data:tt+i'); txtadd(plugin[text].html, 'data:ttx+i'); </action>
end while