Hello,
I've been trying to create next and previous buttons that will load the previous or next scenes in a scenes document.
The code that is almost working is :
Code
<action name="prenex">
trace(scene.count);
set(totalviews,get(scene.count));
set(i,0);
prenex2(get(i),%1,get(cview));
</action>
<action name="prenex2">
if(scene[%1].name==%3,
set(v,%1);
prenex3(%1,%2,get(totalviews))
,
inc(i);
prenex2(get(i),%2,%3);
);
</action>
<action name="prenex3">
trace(%1___%2___%3);
if(%2==prev,
if(%1==0,
dec(totalviews);
prenex_load(get(totalviews))
,
dec(v);
prenex_load(get(v))
);
);
if(%2==next,
if(%1==%3,
prenex_load(0)
,
inc(v);
prenex_load(get(v))
);
);
</action>
<action name="prenex_load">
trace(%1);
loadscene(get(scene[%1].name),null,MERGE,blend(0.3)),
</action>
Display More
The problem I think is that each time the current scene number (cview) is being reset to zero, so I can do next and previous scenes but not the ones after. Any ideas on how I can dynamically define scene numbers so I can set a list?
Cheers