krpano之热点样式及⽂本
修改热点的样式只需要将热点引⽤的style样式替换即可。
动态样式代码:
<style name="skin_hotspotstyle" url="zlqj_hotspot_2.png" crop="0|0|128|112" framewidth="128" frameheight="112" frame="0" lastframe="4" scale="0.5" oy="50"
onclick="if(linkedscene, tween(scale,0.25,0.5); tween(oy,-20,0.5); tween(alpha,0,0.5); looktohotspot();
loadscene(get(linkedscene),null,MERGE,BLEND(1)); skin_updatescroll(); );"
onhover="if(ltips_hotspots, if(linkedscene, showtext(get(scene[get(linkedscene)].title),SKIN_TOOLTIPS)) );"
onloaded="hotspot_animate();if(distorted,add_tooltip2(get(linkedscene),1),add_all_the_time_tooltip(get(linkedscene),1));"/>
<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.3, if(loaded, hotspot_animate()) );
</action>
图⽚:
⽂本添加:
⾸先添加⽂本样式。
<action name="add_all_the_time_tooltip">
txtadd(tooltipname, 'tooltip_', get(name));
addplugin(get(tooltipname));
txtadd(plugin[get(tooltipname)].parent, 'hotspot[', get(name), ']');
set(plugin[get(tooltipname)].url,'%SWFPATH%/plugins/textfield.swf');
set(plugin[get(tooltipname)].align,bottom);
set(plugin[get(tooltipname)].edge,bottom);
set(plugin[get(tooltipname)].x,0);
set(plugin[get(tooltipname)].y,-23);
set(plugin[get(tooltipname)].width,130);
set(plugin[get(tooltipname)].autoheight,true);
set(plugin[get(tooltipname)].background,true);
set(plugin[get(tooltipname)].backgroundcolor,0x000000);
set(plugin[get(tooltipname)].roundedge,3);
set(plugin[get(tooltipname)].backgroundalpha,0.0);
set(plugin[get(tooltipname)].border,true);
set(plugin[get(tooltipname)].glow,4);
set(plugin[get(tooltipname)].glowcolor,0xF6B017);
animate下载安装set(plugin[get(tooltipname)].css,'text-align:center; color:#ffffff; font-family:Arial; font-weight:bold; font-size:20px;');
set(plugin[get(tooltipname)].textshadow,1);
set(plugin[get(tooltipname)].textshadowrange,6.0);
set(plugin[get(tooltipname)].textshadowangle,90);
copy(plugin[get(tooltipname)].html,scene[get(linkedscene)].title);
set(plugin[get(tooltipname)].enabled,false);
</action>
然后在热点样式的 onloaded 属性中加载。
onloaded="hotspot_animate();if(distorted,add_tooltip2(get(linkedscene),1),add_all_the_time_tooltip(get(linkedscene),1));"
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论