Sie sind nicht angemeldet.

Tangent12

Schüler

  • »Tangent12« ist der Autor dieses Themas

Beiträge: 90

Wohnort: Liverpool, UK

Beruf: Application Developer

  • Nachricht senden

1

Samstag, 3. April 2010, 13:43

Plugin y value

Hi all,

I am having a problem setting the y value of a plugin.
If I set it to 50% it just seems to appear at the bottom of the screen and not 50% of the screen height as it states in the documentation.

It appears to be aligning itself to the bottom of the stage. If I have align center I see the top half of the plugin at the bottom of the screen, align bottom sets the bottom of the plugin to the bottom of the stage.

I've tried combinations of align and edge with no significant difference, it always seems to align to the bottom as its base.
Even if I am setting the y value to a number not a percentage I have to use a negative value to get it on the screen.

Any tips would be much appreciated.

Thanks.

T12
Liverpool based panoramic photography, virtual tour and
web media organisation specialising in high quality web experiences.

2

Samstag, 3. April 2010, 19:53

hi,
again I think you can use the maths stuff here.
cheers

mick

3

Samstag, 3. April 2010, 21:20

show us the code.

4

Samstag, 3. April 2010, 22:07

oh thanks ;-)

I'll have a go later,
I found this bit

<action name="show_html_field">
set(plugin[htmltext].y,0);
tween(plugin[htmltext].alpha,1,0);
tween(plugin[htmltext].textblur,0,0);
tween(plugin[htmltext].blur,0,0);
set(plugin[htmltext].visible,true);
set(plugin[htmltext].enabled,true);
tween(plugin[htmltext].y,0);
sub(plugin[htmltext].height,stageheight,150);
sub(sparewidth,stagewidth,plugin[image01].width);
div(plugin[htmltext].width,sparewidth,2);
trace('plugin[htmltext].height =', get(plugin[htmltext].height));
trace('plugin[htmltext].width =', get(plugin[htmltext].width));
tween(plugin[htmltext].alpha,0.4);
</action>

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »michael crane« (3. April 2010, 22:21)


5

Sonntag, 4. April 2010, 10:52

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
<krpano version="1.0.8" >

		<preview type="grid(cube,16,16,512,0xCCCCCC,0xFFFFFF,0x999999);" details="16" />

	<view hlookat="12" vlookat="40" fov="105" />

<plugin name="textshow" style="button"
	    	html="[p]+ text[/p]"
	    	align="leftbottom" x="100" y="100"
			onclick="action(placebox);"
			keep="true"	
			/>	

<!--<action name="placebox">
set(plugin[textshow].x,300);
set(plugin[textshow].y,300);
</action>	-->
<action name="placebox">
	div(plugin[textshow].y,stageheight,2);
	div(plugin[textshow].x,stagewidth,2);
</action>		
			
			
<style name="button" 
	   	keep="true"
	   	url="./textfield.swf"
	   	css="p{color:#FFFFFF; font-family:Arial; font-size:14; margin-left:5; margin-right:5; text-align:center; }"
	   	children="false"
	   	visible="true"
	   	width="100"
	   	height="22"
	   	backgroundcolor="0x000000"
	   	roundedge="5"
	   	shadow="1"
	   	borderwidth="0"
		   glow="4"
	   		   	/>	
</krpano>

Tangent12

Schüler

  • »Tangent12« ist der Autor dieses Themas

Beiträge: 90

Wohnort: Liverpool, UK

Beruf: Application Developer

  • Nachricht senden

6

Sonntag, 4. April 2010, 10:58

Hi Michael, thanks for your feedback.
I am going to look at it properly this afternoon.

Thanks again for your help.

T12
Liverpool based panoramic photography, virtual tour and
web media organisation specialising in high quality web experiences.

Tangent12

Schüler

  • »Tangent12« ist der Autor dieses Themas

Beiträge: 90

Wohnort: Liverpool, UK

Beruf: Application Developer

  • Nachricht senden

7

Sonntag, 4. April 2010, 15:53

Hi Michael,

I have found and fixed the problem with my code!
I (stupidly) had the plugin set to parent to another plugin which was aligned with the bottom of the screen.

Now this is fixed it may help to align a flyout hotspot with a plugin as in my other post. I'll let you know how I get on.

Thanks for your help.

T12
Liverpool based panoramic photography, virtual tour and
web media organisation specialising in high quality web experiences.