Sie sind nicht angemeldet.

Gerard

Anfänger

  • »Gerard« ist der Autor dieses Themas

Beiträge: 13

Wohnort: Netherlands

Beruf: Professional Photographer

  • Nachricht senden

1

Montag, 7. Februar 2011, 15:10

Automatic Scaling of distance between Thumbnails: How ?

Hi,

When I change the size of my screen the panoramas are scaling.
However, the distance between the Thumbnails does not scale.
Is it possible to write a code that in case of a smaller screensize all the thumbnails can be seen ?

Here is my Tour of the Dutch coast:

http://homepage.mac.com/gkuster/Sites/Wa…nd/pano-01.html

Click on 'Show more Panoramas' to see all the 12 Thumbnails.



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
<plugin name="thumb-01"
			url="../thumbs/thumb-01.png"
			align="leftbottom"
			x="30"
			y="80"
			alpha="0.6"
			scale="0.8"
			visible="false"
			
		zorder="4"
		keep="true"
				
			onhover="showtext(Oosterbierumer polder,buttonstyle);"
			
			onover="tween(alpha,1.0, 0.3); 
					tween(scale,1.0, 0.3);
					tween(x,20, 0.3);
					tween(y,80, 0.3);"		
				
			onout="tween(alpha,0.6, 0.2); 
					tween(scale,0.8, 0.2);
					tween(x,30, 0.2);
					tween(y,80, 0.2);"
			
			onclick="loadpano('pano-01.xml', view.fov=0.20&view.hlookat=-0.02&view.vlookat=0.00, MERGE, BLEND(2));"
						
			
			/>
			
			
			
	
<plugin name="thumb-02"
			url="../thumbs/thumb-02.png"
			align="leftbottom"
			x="150"
			y="80"
			alpha="0.6"
			scale="0.8"
			visible="false"
			
		zorder="4"
		keep="true"
			
			onhover="showtext(Koehool - Groote Noorderpolder,buttonstyle);"
			
			onover="tween(alpha,1.0, 0.3); 
					tween(scale,1.0, 0.3);
					tween(x,140, 0.3);
					tween(y,80, 0.3);"
					
					
					
			onout="tween(alpha,0.6, 0.2); 
					tween(scale,0.8, 0.2);
					tween(x,150, 0.2);
					tween(y,80, 0.2);"
				
		onclick="loadpano('pano-02.xml', view.fov=0.36&view.hlookat=-0.03&view.vlookat=0.00, MERGE, BLEND(2));"
				
			
			/>	



Is there a solution *question*

Hope someone can help me with this.

Gerard

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Gerard« (11. Februar 2011, 21:31)


2

Montag, 7. Februar 2011, 15:36

you have to use % instead of pixels for your positioning.

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

3

Montag, 7. Februar 2011, 15:44

He Gerard,

in stead of absolute numbers you can use %..

so:

<plugin name="thumb-01"
url="../thumbs/thumb-01.png"
align="leftbottom"
x="3%"
y="80"
alpha="0.6"
scale="0.8"
visible="false"
edge="center"
zorder="4"
keep="true"

onhover="showtext(Oosterbierumer polder,buttonstyle);"

onover="tween(alpha,1.0, 0.3);
tween(scale,1.0, 0.3);
"

onout="tween(alpha,0.6, 0.2);
tween(scale,0.8, 0.2);
"

onclick="loadpano('pano-01.xml', view.fov=0.20&view.hlookat=-0.02&view.vlookat=0.00, MERGE, BLEND(2));"


/>




<plugin name="thumb-02"
url="../thumbs/thumb-02.png"
align="leftbottom"
x="13%"
y="80"
alpha="0.6"
scale="0.8"
visible="false"
edge="center"
zorder="4"
keep="true"

onhover="showtext(Koehool - Groote Noorderpolder,buttonstyle);"

onover="tween(alpha,1.0, 0.3);
tween(scale,1.0, 0.3);
"



onout="tween(alpha,0.6, 0.2);
tween(scale,0.8, 0.2);
"

onclick="loadpano('pano-02.xml', view.fov=0.36&view.hlookat=-0.03&view.vlookat=0.00, MERGE, BLEND(2));"


/>


So the x of the plugin i changed in % (you have to set it yourself to make nice)
I also put an edge to make that onhover tween does what you want, so you don't need to define that in the onover onout..

I'm not 100% sure that it is as you like but give it a try and play a bit.



Hope this helps

Tuur *thumbsup*

Gerard

Anfänger

  • »Gerard« ist der Autor dieses Themas

Beiträge: 13

Wohnort: Netherlands

Beruf: Professional Photographer

  • Nachricht senden

4

Montag, 7. Februar 2011, 16:27

Thanks a lot, this is realy a great Forum *thumbup*

Tuur, what do you mean by: *question* ....I also put an edge to make that onhover tween does what you want, so you don't need to define that in the onover onout..

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

5

Montag, 7. Februar 2011, 16:37

He Gerard,

did it work?

i put edge
edge="center"

you had this in your plugin:

Quellcode

1
2
tween(x,20, 0.3);
					tween(y,80, 0.3);


in the onover etc..

with the edge center it does sort of the same so it tweens scale from the center..

try to change it with left or right.. then you see what it does..

I hope it works as i say (?)

Not programming now..

Tuur *thumbsup*

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

6

Montag, 7. Februar 2011, 16:39

ah i see you changed it..

maybe put the left one on 3% (orso) and then the right one on 97% and the rest equal differences so then it always fills up the whole screen width.

cheers

Mooie plaatjes trouwens

Tuur
*thumbsup*

Gerard

Anfänger

  • »Gerard« ist der Autor dieses Themas

Beiträge: 13

Wohnort: Netherlands

Beruf: Professional Photographer

  • Nachricht senden

7

Montag, 7. Februar 2011, 17:08

Hi Tuur,
Yes I changed it and it and as you can see works perfectly.
Thanks a lot for this 'online-course in programming' *thumbup*
I have one more question.
When I get over the Thumnail, each Thumbnail is scaling from left-bottom to rifht-up.
How can I get them to scale from its own center *question*

8

Montag, 7. Februar 2011, 17:53

When I get over the Thumnail, each Thumbnail is scaling from left-bottom to rifht-up.
How can I get them to scale from its own center


just like Tuur stated add edge="center" to each thumbnails plugin code. then it will scale from the center instead of the bottomleft.

Gerard

Anfänger

  • »Gerard« ist der Autor dieses Themas

Beiträge: 13

Wohnort: Netherlands

Beruf: Professional Photographer

  • Nachricht senden

9

Montag, 7. Februar 2011, 19:08

Sorry, I overlooked that code in TUUR's reply.
It's perfect now.
Thanks *thumbsup*

mds

Fortgeschrittener

Beiträge: 152

Wohnort: Athens, GA

Beruf: Designer

  • Nachricht senden

10

Dienstag, 8. Februar 2011, 16:13

Tuur to the rescue! *g*
Say "Hi!" on twitter

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

11

Dienstag, 8. Februar 2011, 16:23

*thumbsup*


OT:
(ooooh mannnnn i get crazy this big company's need soooooooooooooo much time for just simple things to decide... makes me *angry* *cursing* *cry* *sad* *wacko* *evil*

Ähnliche Themen