You are not logged in.

fellipe

Trainee

  • "fellipe" started this thread

Posts: 67

Location: Brazil

Occupation: Photographer

  • Send private message

1

Wednesday, June 16th 2010, 5:56am

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:

Source code

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"
		/>

mindlessboss

Professional

Posts: 1,082

Location: Russia, Kaliningrad

  • Send private message

2

Wednesday, June 16th 2010, 6:14am

<!-- 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

mindlessboss

Professional

Posts: 1,082

Location: Russia, Kaliningrad

  • Send private message

3

Wednesday, June 16th 2010, 6:19am

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

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

4

Wednesday, June 16th 2010, 7:52am

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

Source code

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

Trainee

  • "fellipe" started this thread

Posts: 67

Location: Brazil

Occupation: Photographer

  • Send private message

5

Wednesday, June 16th 2010, 7:58am

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

Source code

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 :)