|
|
Source code |
1 2 3 4 |
<action name="startup"> <!-- load the first scene --> loadscene(get(scene[0].name), null, MERGE); </action> |
|
|
Source code |
1 2 |
<!-- load the first scene --> loadscene(get(scene[scene.count].name), null, MERGE); |
This post has been edited 1 times, last edit by "MB94" (Nov 29th 2011, 8:56pm)
sub(count,1);
|
|
Source code |
1 |
loadscene(get(scene[sub(scene.count,1);].name), null, MERGE); |
|
|
Source code |
1 2 |
WARNING: not local trusted - ExternalInterface disabled! ERROR: loadscene() - scene "null" not found |
Hi!
You can't use action as parametr.
so make some variable
set(var,get(scene.count)); <!-- create some variable -->
sub(var,1);
loadscene(get(scene[get(var)].name), null, MERGE);
Andrey![]()
Location: Netherlands
Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
|
|
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 |
<action name="nextscene">
if(%1 != findnext, set(i,0));
txtadd(scenexml,'<krpano>',get(scene[%i].content),'</krpano>');
if(scenexml == xml.content,
inc(i);
if(i == scene.count, set(i,0));
loadscene(get(scene[%i].name), null, MERGE, BLEND(1));
,
inc(i);
if(i LT scene.count, nextscene(findnext));
);
</action>
<action name="prevscene">
if(%1 != findnext, sub(i,scene.count,1));
txtadd(scenexml,'<krpano>',get(scene[%i].content),'</krpano>');
if(scenexml == xml.content,
dec(i);
if(i LT 0, sub(i,scene.count,1));
loadscene(get(scene[%i].name), null, MERGE, BLEND(1));
,
dec(i);
if(i GE 0, prevscene(findnext));
);
</action>
|
: https://pame.virtualtuur.com