码迷,mamicode.com
首页 > 其他好文 > 详细

krpano之热点样式及文本

时间:2017-08-17 21:34:54      阅读:668      评论:0      收藏:0      [点我收藏+]

标签:too   idt   copy   back   热点   pos   ffffff   css   merge   

修改热点的样式只需要将热点引用的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(skin_settings.tooltips_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);
        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));"

 

krpano之热点样式及文本

标签:too   idt   copy   back   热点   pos   ffffff   css   merge   

原文地址:http://www.cnblogs.com/s313139232/p/7384141.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!