I am having problems trying to resize correctly both away3d Gold, master branch and Starling in stage3d both working in a single game.
I have 4 starling instances and 1 Away3d instance handled by stage3dProxys.
This all work PERFECT on the initial size. Problems start when resizing the game in a browser.
The game .swf will be loaded by another parent .swf in the end, but when the game is loaded directly on it’s own HTML template the same thing happens.
What I have for now is:
stage.addEventListener( Event.RESIZE, onResize, false, 0, true );
private function onResize(event:Event):void {
_stage3DProxy.width = stage.stageWidth;
_stage3DProxy.height = stage.stageHeight;
}
It is working for starling instances, but not for away 3d instance. AND it does not show the cutted images that should be outside the stage.
I also tried unsuccesfully:
starling.stage.stageWidth = this.stage.stageWidth;
starling.stage.stageHeight = this.stage.stageHeight;
var viewPort:Rectangle = RectangleUtil.fit(
new Rectangle(0, 0, stage.stageWidth, stage.stageHeight),
new Rectangle(0, 0, stage.fullScreenWidth, stage.fullScreenHeight),
ScaleMode.NO_BORDER);
Starling.current.viewPort = viewPort;
What I want to achieve is what you achieve in traditional Flash when setting the Size to “percentage” the scale to:“NO_BORDER” and the align to: “Top Center” with a min height and width.
How to achieve this?
Thank you
Matej