I have a quite different problem with resizing. I have a Flexbook component which uses the middle part of screen (center) with a html header menu and footer.
The problem:
The scaling works perfectly when we run in the local machine ( Flexbuilder). But when we deploy it to the server its like scaling never existed..
The requirement:
when user maximizes the window or minimizes it, the Flexbook should be resized to fit the screen.
I’ve used resize() method of top layer:
protected function application1_resizeHandler(event:ResizeEvent):void
{
var scaleX: Number = Application.application.width / 1024;
var scaleY: Number = Application.application.height / 762;
this.scaleX = this.scaleY = (scaleX>scaleY?scaleY:scaleX);
for (var i:int = 0; i < this.numChildren - 1; ++i) {
if(this.getChildAt(i))
this.getChildAt(i).scaleX = this.getChildAt(i).scaleY = (scaleX>scaleY?scaleY:scaleX);
}
}
Appreciate if anyone can explain why its happening:
- is there anything needed form server/html side ( parameter/options to enable scaling etc?)
- can we do something from within Flex ?
as far as i know, nothing is to do on server side. Which browser do you use on developer machine and server?
i would use the remote debugger in flex builder and would check the variables and if anyone calling the method.
BR
Frank