Sie sind nicht angemeldet.

1

Dienstag, 12. März 2013, 10:47

Scrolling Textfield with Action

Hello

Recently I downloaded from the example Scrolling textfield
http://krpano.com/examples/10815/example…gtextfield.html

I would like to be added to the action, for example,
<a href="http://www.krpano.com"> open krpano site </ a> <br/>
<a href="event:lookto(0,0,130);lookto(90,0,150);"> to some lookto actions </ a> <br/>
<a href="event:action(move,htmltext);"> click to move field </ a> <br/>
<a href="event:action(show_html_field2);"> open second field </ a> <br/>

as in the following example:
http://krpano.com/examples/textfield/

The code is part of [a href = "event: OpenURL (http://www.nasa.gov);"] sss [/ a] [br /] but it does not work

Please help me how to do it.
I'm sorry I know little English
We warmly greet



Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!--
	krpano - scrolling textfield example
-->

<krpano>
	
	<!-- use a grid preview pano as background -->
	<preview type="grid(cube,16,16,512,0xCCCCCC,0xF6F6F6,0x999999);" details="16" />
	
	<!-- view settings -->
	<view hlookat="0" vlookat="0" fovtype="VFOV" fov="100" fovmin="60" fovmax="150" />


<!-- the textfield with a scrollbar and scroll buttons -->
<layer name="textbox" url="textfield.png" align="center" x="0" y="0" width="280" height="300">
		
		<layer name="textmask" type="container" align="lefttop" x="5" y="5" width="240" height="290" maskchildren="true">
			<layer name="text" url="%SWFPATH%/plugins/textfield.swf" handcursor="false" children="false" align="lefttop" x="10" y="10" width="220" autoheight="true" background="false" border="false" html="data:testtext" css="color:#000000; font-family:Arial; font-size:12;" />
		</layer>
		
		<layer name="scrollbar" type="container" bgcolor="0x000000" bgalpha="0.3" align="righttop" x="5" y="5" zorder="1" width="19" height="290" />
		
		<layer name="scrollup" url="dirbutton.png" align="righttop" x="24" y="5" zorder="2" rotate="-90" crop="0|0|19|19" onovercrop="0|19|19|19" ondowncrop="0|38|19|19"
		   	ondown="asyncloop(pressed, sub(ny,layer[text].y,10); add(ny,+8); sub(th,270,layer[text].pixelheight); if(ny GT 0, set(ny,0)); div(sy,ny,th); mul(sy,233); add(sy,24); copy(layer[scrollslider].y,sy); add(ny,10); copy(layer[text].y,ny); );"
		   	/>

		<layer name="scrolldown" url="dirbutton.png" align="rightbottom" x="24" y="5" zorder="2" rotate="+90" crop="0|0|19|19" onovercrop="0|19|19|19" ondowncrop="0|38|19|19"
		   	ondown="asyncloop(pressed, sub(ny,layer[text].y,10); add(ny,-8); sub(th,270,layer[text].pixelheight); if(ny LT th, copy(ny,th)); div(sy,ny,th); mul(sy,233); add(sy,24); copy(layer[scrollslider].y,sy); add(ny,10); copy(layer[text].y,ny); );"
		   	/>

		<layer name="scrollslider" url="sliderbutton.png" align="righttop" x="5" y="24" zorder="2" crop="0|0|19|19" onovercrop="0|19|19|19" ondowncrop="0|38|19|19" 
		   	ondown="copy(cy,y);copy(sy,mouse.stagey);dragging();" 
		   	dragging="if(pressed, sub(dy,mouse.stagey,sy); add(ny,cy,dy); if(ny LT 24, set(ny,24)); if(ny GT 257, set(ny,257)); copy(y,ny); sub(ty,ny,24); div(ty,233); sub(th,270,layer[text].pixelheight); mul(ty,th); add(ty,10); copy(layer[text].y,ty); delayedcall(0,dragging()); );"
		   	/>

	</layer>
	

	<!-- test text -->
	<data name="testtext">
		start text test text test text test text test[br/]
		text test text test text test text[br/]
		test text test text[br/]
		[br/]
		test text test text test text[br/]
		[br/]
		test text test text test[br/]
		text test text test
		[br/]
		text test[br/]
		text test text test text test[br/]
		text test text[br/]
		[a href="event:openurl(http://www.nasa.gov);"]sss[/a][br/]
		end test text test text test text[br/]

	</data>


	<action name="hidewindow">
		set(plugin[%1].y,3000);
		set(plugin[%1].enabled,false);
		tween(plugin[%1].alpha,0);
		tween(plugin[%1].blur,20);
		tween(plugin[%1].textblur,20,0.5,easeoutquad,set(plugin[%1].visible,false));
	</action>
	
	<action name="showbutton">
		set(plugin[button].visible,true);
		set(plugin[button].enabled,true);
		tween(plugin[button].alpha,1);
	</action>	
	
	
</krpano>