Sie sind nicht angemeldet.

fellipe

Schüler

  • »fellipe« ist der Autor dieses Themas

Beiträge: 67

Wohnort: Brazil

Beruf: Photographer

  • Nachricht senden

1

Mittwoch, 16. Juni 2010, 05:56

Maintain aspect ratio of bottom banner?

I added a bottom banner to a new tour I'm creating but I'd like the bottom banner img maintain its aspect ratio no matter the screen size. How can I do that?

The code:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
	<plugin name="bar"
		url="images/bottom.png"
		align="bottom"
		alpha="1"
		x="0"
		y="0"
		height="15%"
		width="100%"
		keep="true"
		handcursor="false"
		/>

2

Mittwoch, 16. Juni 2010, 06:14

<!-- button with scale9grid -->
<plugin name="button1" url="button.png"
align="center" edge="center" x="-25%"
scale9grid="12|9|74|71"
onhover="showtext(scale9grid button[br]click to toggle scale, hoverstyle);"
onclickA="tween(scale,3);set(onclick,call(onclickB));"
onclickB="tween(scale,1);set(onclick,call(onclickA));"
onclick="call(onclickA);"
/>
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

3

Mittwoch, 16. Juni 2010, 06:19

or set width to 100%
and height to XX pixels
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

4

Mittwoch, 16. Juni 2010, 07:52

Hi fellipe,

I think you are looking for the "prop" value property...
  • width
    width of the plugin in absolute pixels or percents of the screenwidth
    set it to "prop" to allow scaling the width proportional to the height
    if nothing is set, the width of the source file will be set
  • height
    height of the plugin in absolute pixels or percents of the screenheight
    set it to "prop" to allow scaling the height proportional to the width
    if nothing is set, the height of the source file will be set

Quellcode

1
2
3
4
5
6
7
8
9
10
11
<plugin name="bar"
	url="images/bottom.png"
	align="bottom"
	alpha="1"
	x="0"
	y="0"
	height="prop"
	width="100%"
	keep="true"
	handcursor="false"
	/>

SAlut.

fellipe

Schüler

  • »fellipe« ist der Autor dieses Themas

Beiträge: 67

Wohnort: Brazil

Beruf: Photographer

  • Nachricht senden

5

Mittwoch, 16. Juni 2010, 07:58

Hi fellipe,

I think you are looking for the "prop" value property...
  • width
    width of the plugin in absolute pixels or percents of the screenwidth
    set it to "prop" to allow scaling the width proportional to the height
    if nothing is set, the width of the source file will be set
  • height
    height of the plugin in absolute pixels or percents of the screenheight
    set it to "prop" to allow scaling the height proportional to the width
    if nothing is set, the height of the source file will be set

Quellcode

1
2
3
4
5
6
7
8
9
10
11
<plugin name="bar"
	url="images/bottom.png"
	align="bottom"
	alpha="1"
	x="0"
	y="0"
	height="prop"
	width="100%"
	keep="true"
	handcursor="false"
	/>

SAlut.
Perfect Michel.
Thank you very much :)