Krpano,动画图标的完整代码,拷贝就能用
<action name="animate">
if (tour_stopsequence == false,
if (stopspotsequence == false,
txtadd(delayedname, %1, 'delay');
if(hotspot[%1].loaded,
inc(hotspot[%1].frame,1,get(hotspot[%1].lastframe),0);
mul(hotspot[%1].ypos,get(hotspot[%1].frame),get(hotspot[%1].frameheight));
txtadd(hotspot[%1].crop,'0|',get(hotspot[%1].ypos),'|',get(hotspot[%1].framewidth),'|',get(hotspot[%1].frameheight));
);
delayedcall(get(delayedname),%2,animate(%1,%2));
);
);
</action>
<action name="startspotanimation">
set(tour_stopsequence, false);
set(stopspotsequence , false);
animate(get(name), %1);
</action>
<action name="stopspotanimation">
set(hotspot[%1].stopspotsequence, true);
txtadd(delayedname, %1, 'delay');
stopdelayedcall(get(delayedname));
</action>
<action name="interruptAnimation">
if(tour_stopsequence == false,
set(tour_stopsequence, true);
);
</action>
<action name="skin_hotspotstyle_animate_onloaded">
startspotanimation(0.1);
</action>
使用方法:
<style name="IconspotHelicopter" url="%SWFPATH%skin/spots/helicopter.png" visible="true" frame="0" lastframe="24" framewidth="128" frameheight="128" stopspotsequence="false" crop="0|0|128|128" height="48" width="48" custom="true" onloaded="skin_hotspotstyle_animate_onloaded();" />
其中:
frame:从第几帧开始播放
lastframe:结束的帧数
framewidth:每一帧的宽度
frameheight:每一帧的高度
stopspotsequence:是否停止播放
crop:每一帧裁剪的左上角和右下角坐标
width:图标的显示宽度
height:图标的显示高度
onloaded:调用动画图标函数,onloaded="skin_hotspotstyle_animate_onloaded();"
联系客服