I successfuklly managed to create a png animation and because I need to trigger the start and stop of it I followed a code example from Klaus to test it.
Unfortunately it won't start when I use a separate start button (or any other event).
It only starts when it is triggered by clicking on the hotspot itself.
When clicking on the start button it will move only for one step.
I've been fooling around with it for hours now and can't find a solution.
Please could someone check and see what's wrong.
My example is here.
Thank you very much
Jürgen
Code
<krpano version="1.0.8.14" onstart="showlog(true)">
<plugin url="plugins/options.swf"/>
<preview type="grid(cube,16,16,512,0xCCCCCC,0xFFFFFF,0x999999);" details="16" />
<view hlookat="273" vlookat="-0.368" fovtype="MFOV" fov="107.3" maxpixelzoom="1.0" fovmax="120" limitview="auto" />
<style name="animate" url="bilder/avatar_komp.png" anistopped="true" crop="0|0|250|300" keep="true" zorder="99" scale="1" align="center" framewidth="250" frameheight="300" frame="0" lastframe="14" onloaded="" />
<hotspot name="avatar" enabled="true" style="animate" ath="-100" atv="0" keep="true" devices="all" onhover="" onclick="start()"/>
<action name="start">
set(hotspot[avatar].anistopped, false);
animate(avatar);
</action>
<action name="stop">
set(hotspot[avatar].anistopped, true);
</action>
<hotspot name="hs2" devices="all"
url="buttons/stop.jpg"
keep="false"
ath="-43.40894489106648" atv="-7.63377832222469"
zoom="false" distorted="false"
width="120" height="120"
onclick="stop()"
/>
<hotspot name="hs1" devices="all"
url="buttons/start.jpg"
keep="false"
ath="-43.40894489106648" atv="-20"
zoom="false" distorted="false"
width="120" height="120"
onclick="start()"
/>
<action name="animate">
inc(hotspot[%1].frame,1,get(hotspot[%1].lastframe),0);
mul(xpos,hotspot[%1].frame,hotspot[%1].framewidth);
txtadd(hotspot[%1].crop,get(xpos),'|0','|',get(hotspot[%1].framewidth),'|',get(hotspot[%1].frameheight));
if(anistopped == false, delayedcall(0.1, animate(%1) ););
</action>
</krpano>
Display More