Hi,
I’m using the latest Away3D 3.6 for FlashPlayer 10 from the svn-trunk.
I’m trying to resize the view to the same size like the stage. What I want is for example when my Stage is 100x100 and I see a cube which is 20px width and I resize the stage to 1000x1000 the cube should be 200px width. I know I can set the stageScale of the whole movie, but for my application this is no choice. I have to set the stageScale to “noscale”, so I first tried to set a RectangleClipping.
var width3D:Number=stage.stageWidth;
var height3D:Number=stage.stageHeight;
view.clipping=new RectangleClipping({minX:-(width3D/2),minY:-(height3D/2),maxX:(width3D/2),maxY:(height3D/2)});
view.x = width3D / 2;
view.y = height3D / 2;
But this is only cropping the View. It is not resizing.
Afterward I tried to work with the height and width properties of the view.
var width3D:Number=stage.stageWidth;
var height3D:Number=stage.stageHeight;
view.width=width3D;
view.height=height3D;
view.x = width3D / 2;
view.y = height3D / 2;
But my 3Dscene always gets smaller when I resize my window until I can’t see it anymore.
So I tried a combination with the RecangleClipping
var width3D:Number=stage.stageWidth;
var height3D:Number=stage.stageHeight;
view.clipping=new RectangleClipping({minX:-(width3D/2),minY:-(height3D/2),maxX:(width3D/2),maxY:(height3D/2)});
view.width=width3D;
view.height=height3D;
view.x = width3D / 2;
view.y = height3D / 2;
Now it is almost working, but It seems like the height Property is sometimes working the other-way-around. When it should get bigger it gets smaller and vice versa.
I also tried the scale properties with no luck. Sometimes it looks like another class resets my settings. Is that possible?
I also tried putting the view in a Sprite Container, with the same strange results.
This is really frustrating! The Problem can’t be so hard to solve. So, what is the best way of doing this?