概述
关键代码:
<!-- skin_hotspotstyle - style for the hotspots (note - the onclick event will be overwritten here and can't be set directly at the hotspot! the hotspots need to have a 'linkedscene' attribute to be clickable) -->
<!-- -->
<style name="skin_hotspotstyle" url="../../../../img/snmy.png" crop="0|0|86|90" framewidth="128" frameheight="112" frame="0" lastframe="5" scale="0.5" oy="50" distorted="false"
οnclick="if(linkedscene, tween(scale,0.25,0.5); tween(oy,-20,0.5); looktohotspot(); tween(alpha,0,0.5); loadscene(get(linkedscene),null,MERGE,BLEND(1)); skin_updatescroll(); );"
onhover="if(skin_settings.tooltips_hotspots, if(linkedscene, showtext(get(scene[get(linkedscene)].title),SKIN_TOOLTIPS)) );"
onloaded="if(distorted,add_tooltip2(get(linkedscene),1),add_all_the_time_tooltip(get(linkedscene),1));"/>
<!-- 箭头上添加文字的部分 开始 -->
<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,top);
set(plugin[get(tooltipname)].edge,bottom);
set(plugin[get(tooltipname)].x,0);
set(plugin[get(tooltipname)].y,30);
set(plugin[get(tooltipname)].width,180);
set(plugin[get(tooltipname)].autoheight,true);
set(plugin[get(tooltipname)].background,false);
set(plugin[get(tooltipname)].backgroundcolor,0x000000);
set(plugin[get(tooltipname)].roundedge,10);
set(plugin[get(tooltipname)].backgroundalpha,0.5);
set(plugin[get(tooltipname)].border,false);
set(plugin[get(tooltipname)].glow,4);
set(plugin[get(tooltipname)].glowcolor,0xFFFFFF);
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>
<action name="add_tooltip2">
txtadd(tooltipname, 'tooltip_', get(name));
addhotspot(get(tooltipname));
set(hotspot[get(tooltipname)].url,'%SWFPATH%/plugins/textfield.swf');
set(hotspot[get(tooltipname)].align,bottom);
set(hotspot[get(tooltipname)].edge,top);
set(hotspot[get(tooltipname)].distorted,true);
set(hotspot[get(tooltipname)].ath,get(ath));
set(hotspot[get(tooltipname)].atv,get(atv));
set(hotspot[get(tooltipname)].oy,50);
set(hotspot[get(tooltipname)].width,180);
set(hotspot[get(tooltipname)].autoheight,true);
set(hotspot[get(tooltipname)].background,false);
set(hotspot[get(tooltipname)].backgroundcolor,0x000000);
set(hotspot[get(tooltipname)].roundedge,10);
set(hotspot[get(tooltipname)].backgroundalpha,0.5);
set(hotspot[get(tooltipname)].border,false);
set(hotspot[get(tooltipname)].glow,4);
set(hotspot[get(tooltipname)].glowcolor,0xFFFFFF);
set(hotspot[get(tooltipname)].css,'text-align:center; color:#FFFFFF; font-family:Arial; font-weight:bold; font-size:20px;');
set(hotspot[get(tooltipname)].textshadow,1);
set(hotspot[get(tooltipname)].textshadowrange,6.0);
set(hotspot[get(tooltipname)].textshadowangle,90);
copy(hotspot[get(tooltipname)].html,scene[get(linkedscene)].title);
set(hotspot[get(tooltipname)].enabled,false);
</action>
如果复制没效果 记得修改图片路径
实例热点代码
<hotspot name="spot1" style="skin_hotspotstyle" scale="0.500" width="128.00" height="112.00" alpha="1" rotate="0" ath="-53.74" atv="-12.23" edge="center" rx="0" ry="0" rz="0" ox="0.00" oy="50.00" depth="1000" linkedscene="scene_c2" />
最后
以上就是美丽翅膀为你收集整理的Krapno_全景添加默认热点特效的全部内容,希望文章能够帮你解决Krapno_全景添加默认热点特效所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复