I frequently use constraint based layout to "anchor" the edges of the component to its container. This will stretch your component (not scale) as you resize the browser window.
Normal (absolute) layout: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Button label="Button" width="65" height="22" x="10" y="10"/> </mx:Application> Constraint based layout: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Button label="Button" right="10" left="10" top="10" bottom="10"/> </mx:Application> http://livedocs.adobe.com/flex/201/html/size_position_058_11.html On 6/19/07, Alex Harui <[EMAIL PROTECTED]> wrote:
By default, Flex applications do not scale as the browser window changes size. Instead, they try to re-layout to the new size if percentage width/heights have been specified in the application tag. You can try to set Stage.scaleMode and see what happens. ------------------------------ *From:* [email protected] [mailto: [EMAIL PROTECTED] *On Behalf Of *Abyss Knight *Sent:* Tuesday, June 19, 2007 6:48 AM *To:* [email protected] *Subject:* [flexcomponents] Scaling Hello all, I'm new to Flex as well as ActionScript, but I have been developing a simple directional arrow component in ActionScript for use in our companies' Flex based applications. I have run into a small snag though. I have the arrows drawing, and pointing in radial directions, but whenever the browser is scaled, they don't scale. I've been trying to track down the solution for component scaling for days and have come up with nothing. Any ideas? For reference, I am rendering the arrows inside the annotationElement area of a Flex AreaChart component to indicate wind directions. If there's a better way to do that then by all means let me know. I appreciate any and all suggestions, and hope I can lend a hand here for others as well. Thanks in advance, - William
