Hi,
you can also make animations by dynamically changing the 'crop' setting:
e.g. like the hotspots in this example:
http://krpano.com/examples/10814/example…nihotspots.html
The hotspots are based on one large image which contains all animation frames:
To animate that the 'crop' area for the current frame will dynamically changed and looped by xml code,
e.g. in the above example by:
|
Quellcode
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
<style name="hotspot_ani_white"
url="hotspot_ani_white_64x64x20.png"
crop="0|0|64|64"
framewidth="64" frameheight="64" frame="0" lastframe="19"
onloaded="hotspot_animate();"
/>
<action name="hotspot_animate">
inc(frame,1,get(lastframe),0);
mul(ypos,frame,frameheight);
txtadd(crop,'0|',get(ypos),'|',get(framewidth),'|',get(frameheight));
delayedcall(0.03, if(loaded, hotspot_animate() ) );
</action>
|
And when doing animations that way they have the advantage to be usable identically in Flash AND HTML5.
Best regards,
Klaus