1 person found this helpful
Set the layout property of the Application to horizontal
If your using Flex 3, use <mx:Canvas /> tags
If using Flex 4, use <s:Group /> tags
Here's a Flex 4 example:;
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" width="800" height="600" > <s:layout> <s:HorizontalLayout /> </s:layout> <s:Group width="20%" /> <s:Group width="80%" /> </s:Application>
How do I keep a fixed "aspect ratio" of the resized application so that width:height is always 4:3 ?
I tried to wire the following into the "resize" event but it's firing only at the beginning of a resize.
(this.width / this.height > 4 / 3) ? (this.width = this.height * 4 / 3) : (this.height = this.width * 3 / 4)
All browsers will tell the plugin to resize when resizing has stopped, so listening for resize events will work. I'm not sure why you would only be receiving the first event because I get spammed with events in when the browser is resized.