One more code for animate set of frames with different size and positions. This code need to be modified if it's necessary to animate not one object.
Action animate parameters:
%1 - delay of delayedcall
%2 - time in seconds for tween
Code
<krpano version="1.0.8" onstart="action(onstart);" >
<action name="onstart">
loadscene(scene1,null, MERGE);
</action>
<scene name="scene1" onstart="animate(3,0.3);">
<image>
<left url="pano_l.jpg" />
<front url="pano_f.jpg" />
<right url="pano_r.jpg" />
<back url="pano_b.jpg" />
<up url="pano_u.jpg" />
<down url="pano_d.jpg" />
</image>
<hotspot name="hs1" url="frame1.jpg" style="set1" width="258.07899" height="325.40394" ox="-178.18671" oy="-75.85278" ath="0" atv="0" />
<hotspot name="hs2" url="frame2.jpg" style="set1" width="258.07899" height="325.40394" ox="-178.18671" oy="-75.85278" ath="0" atv="0" />
<hotspot name="hs3" url="frame3.jpg" style="set1" width="258.07899" height="325.40394" ox="-178.18671" oy="-75.85278" ath="0" atv="0" />
<hotspot name="hs4" url="frame4.jpg" style="set1" width="258.07899" height="325.40394" ox="-178.18671" oy="-75.85278" ath="0" atv="0" />
<hotspot name="hs5" url="frame5.jpg" style="set1" width="258.07899" height="325.40394" ox="-178.18671" oy="-75.85278" ath="0" atv="0" />
<style name="set1"
enabled="false" distorted="true" edge="lefttop" alpha="0.0"
/>
<action name="animate">
set(i, -1); delayedcall(%1, loop(%1,%2););
</action>
<action name="loop">
inc(i);
if (i EQ hotspot.count,
dec(i);
set(hotspot[%i].alpha, 0);
dec(i);
set(hotspot[%i].alpha, 0);
set(i, 0);
);
hotspot_on(get(i),%2);
if(i GT 1,
set(j, get(i));
dec(j, 2);
set(hotspot[%j].alpha, 0);
);
delayedcall(%1, loop(%1,%2););
</action>
<action name="hotspot_on">
tween(hotspot[%1].alpha, 1.0 , %2);
</action>
</scene>
</krpano>
Display More