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:
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:
<!-- 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);"
/>
or set width to 100%
and height to XX pixels
Hi fellipe,
I think you are looking for the "prop" value property...
Display More
- 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
<plugin name="bar"
url="images/bottom.png"
align="bottom"
alpha="1"
x="0"
y="0"
height="prop"
width="100%"
keep="true"
handcursor="false"
/>
Display More
SAlut.
Perfect Michel.
Thank you very much :)
Don’t have an account yet? Register yourself now and be a part of our community!