[Laszlo-dev] SOLO Swf Resize while Preserving Aspect Ratio

Aaron Shepherd aaron.shepherd at guestclick.com
Thu Jan 26 15:17:08 PST 2006


I have a rather complex application that we are deploying in SOLO mode
that I would like to automatically resize with preserving the aspect
ratio.  I don't want to use constraints as not all components (like
tabs, tabsliders, etc) auto-constrain font sizes, etc. 

I would like to set the sizes manually (at least of the canvas and outer
most views), and have the flash player take care of the scaling as it
supports scaling with aspect preservation. This allows complete control
of the application look/feel and allows me to develop at a higher
resolution (like 1280x1024 to get the ratios correct), but still deploy
at any size client's browser is configured.  (With special note to the
640x480 screens, which make most modern applications look terrible). 

I also need the application to look good with any size or aspect of
window. So... Why is it that the SWF files generated from Laszlo do not
respect the aspect scale defaults of the flash player? Other
applications/swf files that are pure flash do so.

Is there a way to have the generated solo swf file respect the scale
attribute of the flash player?

Do I need to modify the Java sources used to compile the swf files?

I'm not shy about changing the underlying laszlo source or swf
generation pieces, and would be happy to repost the mods to support this
functionality.

A very simple example is:

[canvas width="1024" height="768" proxied="false"]

[view width="${parent.width}" height="${parent.height}"]

[text]Here is some text[/text]

[/view][/canvas]

When run as an embedded swf, or even a standalone swf, the aspect ratio
specified is not respected.



Things I have tried with no effect:

-         Modified the embed tags in my deployment HTML to have
scale=showall.

-         Modified the base xslt stylesheets provided in the distro from
scale=noscale to scale=showall

-         Modified all the html/js files with respect to any and all
scale= tags

 

I know that most applications would dynamically stretch to fit a page
and utilize more real estate for functional areas, and in fact we have
other applications that work in that manner.  But since this an end-user
consumer oriented application (think TIVOish), I need the application to
look/act/feel the same regardless of the deployment environment.

 

Thanks in advance for any insight into this question.

-Aaron

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://openlaszlo.org/pipermail/laszlo-dev/attachments/20060126/33e4a205/attachment.html


More information about the Laszlo-dev mailing list