返回官网

鼠标悬停热点文字打印机效果

狒狒 2016-9-24 krpano全景 1275 次
<krpano logkey="true">

	<action name="startup" autorun="onstart">
		if(startscene === null OR !scene[get(startscene)], copy(startscene,scene[0].name); );
		loadscene(get(startscene), null, MERGE);
	</action>
	
	
	<style name="skin_hotspotstyle" url="hotspot.png"  edge="center" oy="0" distorted="true"
	       tooltip=""
	       onclick="if(linkedscene, loadscene(get(linkedscene),null,MERGE,ZOOMBLEND(1)); );"
	       onloaded="addtxtfield();"
		   onhover=""
	       />
	
	<scene name="scene_1" title="Special scene? Please go back.." onstart=""  >
		<preview type="grid(cube,16,16,512,0xCCCCCC,0x666666,0x999999);" details="16" />
		<view hlookat="0" fov="100" />
		<hotspot name="test" style="skin_hotspotstyle" ath="10" atv="5" onover="TypeWriter('Hi, i am the Virtual tuur special test scene ', txtfield1);" onout="set(t,1000);set(hotspot[txtfield1].html,)" linkedscene="scene_2"  />
	
	</scene>
	
	
	<scene name="scene_2" title="" onstart=""  >
		<preview type="grid(cube,16,16,512,0x336699,0x00ff00,0x999999);" details="16" />
		<view hlookat="0" fov="100" />
			<hotspot name="test" style="skin_hotspotstyle" ath="10" atv="5" onover="TypeWriter(get(scene[get(linkedscene)].title), txtfield1);" onout="set(t,1000);set(hotspot[txtfield1].html,)" linkedscene="scene_1"  />

	</scene>



<tw speed="0.001"  /> 

<action name="addtxtfield">
	addhotspot(txtfield1);
	set(hotspot[txtfield1].url,plugins/textfield.swf);
	set(hotspot[txtfield1].parent,hotspot[test]);
	set(hotspot[txtfield1].distorted,true);
	set(hotspot[txtfield1].align,right);
	set(hotspot[txtfield1].edge,left);
	set(hotspot[txtfield1].ox,150);
	set(hotspot[txtfield1].background,false);
	set(hotspot[txtfield1].css,'font-family: Verdana; font-size:22px; color:#ffffff; text-align:left;');
</action>
	
<action name="TypeWriter">
	set(t, 0);
	set(twt, '%1'); 
	set(twl, %2); 
	set(l, get(twt.length));
	delayedcall(0, DoTypeWriter());
</action>

<action name="DoTypeWriter">
	subtxt(tws, get(twt), get(t), 1);
	txtadd(tot, get(hotspot[get(twl)].html), get(tws));
	set(hotspot[get(twl)].html, get(tot));
	inc(t);
	if(t LT l, delayedcall(get(tw.speed), DoTypeWriter()); );
</action>

</krpano>

发表评论

Copyright © 2016 DEWEBSTUDIO