On 5/20/05, Matthew Shirey <[EMAIL PROTECTED]> wrote: > This may sound like a odd request, but is there a way to scale the size of > a whole application so that all of the contents get larger?
Setting the scaleMode (?) property on the SWF may be the best option, but here's another technique to do it if you want to experiment: <?xml version="1.0"?> <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns="*" width="100%" height="100%" resize="sizeChanged = true"> <mx:Script> private var sizeChanged:Boolean = true; public function layoutChildren():Void { super.layoutChildren(); if (sizeChanged) { var vm:Object = getViewMetricsAndMargins(); var w:Number = layoutWidth - vm.left - vm.right; var h:Number = layoutHeight - vm.top - vm.bottom; mainBox.scaleX = w / mainBox.layoutWidth * 100; mainBox.scaleY = h / mainBox.layoutHeight * 100; sizeChanged = false; } } </mx:Script> <mx:Box id="mainBox"> <mx:HBox> <mx:Label text="Name" /> <mx:TextInput id="debug" /> </mx:HBox> <mx:List dataProvider="{['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']}" /> </mx:Box> </mx:Application> Note: 1. put your whole app into a Box and call it mainBox 2. in layoutChildren() you set the scaleX and scaleY properties of the application 3. update the sizeChanged flag in the resize event handler Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

