View3D window proportional scaling on full screen

Software: Away3D 4.x

Hector, Sr. Member
Posted: 28 December 2011 08:02 PM   Total Posts: 137

Hi everybody,

In my flash application, I have View3D resized and moved so the 3D animation is displayed in a small area in the swf movie.

When I switch flash to full screen mode, all the 2D display objects in the movie are scaled as usual, but the Stage3D seems to keep the same resolution.

Is there some property to fix this and get the View3D window scaled and positioned right when switching to full screen?

   

inSertCodE, Sr. Member
Posted: 28 December 2011 11:06 PM   Total Posts: 105   [ # 1 ]

stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;

stage.addEventListener(Event.RESIZE, onResize);

private function onResize(event:Event = null):void
{
_view.width = stage.stageWidth;
_view.height = stage.stageHeight;
}

   

Hector, Sr. Member
Posted: 04 January 2012 09:42 AM   Total Posts: 137   [ # 2 ]

Thanks inSertCodE,

In my case, I don’t use the whole stage for 3D but just a ‘window’ in the stage, where the 3D objects are displayed. This window is surrounded by 2D objects.

If I use StageScaleMode.NO_SCALE, when switching to full screen, _view is scaled perfect, but the 2D objects remain un-scaled.

I think I need to put all the 2D objects in a main movie clip container and scale it at the same time than _view.
Sounds like a good idea or is there an easier method?

   

Manuel L., Member
Posted: 21 March 2012 09:29 AM   Total Posts: 99   [ # 3 ]
Hector - 04 January 2012 09:42 AM

Thanks inSertCodE,

In my case, I don’t use the whole stage for 3D but just a ‘window’ in the stage, where the 3D objects are displayed. This window is surrounded by 2D objects.

If I use StageScaleMode.NO_SCALE, when switching to full screen, _view is scaled perfect, but the 2D objects remain un-scaled.

I think I need to put all the 2D objects in a main movie clip container and scale it at the same time than _view.
Sounds like a good idea or is there an easier method?

did this work? i have excactly the same problem ... please give me a solution if you have one smile

   

inSertCodE, Sr. Member
Posted: 21 March 2012 09:52 AM   Total Posts: 105   [ # 4 ]
stage.scaleMode StageScaleMode.NO_SCALE;
stage.align StageAlign.TOP_LEFT;

stage.addEventListener(Event.RESIZEonResize);

private function 
onResize(event:Event null):void
{
_view
.width stage.stageWidth LeftMargin RightMargin;
_view.height stage.stageHeight TopMargin BottomMargin;
_view.LeftMargin;
_view.TopMargin;

TopObject.height TopMargin;
TopObject.width stage.stageWidth;
TopObject.0;
TopObject.0;

BottomObject.height BottomMargin;
BottomObject.width stage.stageWidth;
BottomObject.0;
BottomObject.TopMargin _view.height;

LeftObject.height _view.height;
LeftObject.width LeftMargin;
LeftObject.0;
LeftObject.TopMargin;

RightObject.height _view.height;
RightObject.width RightMargin;
RightObject.LeftMargin _view.width;
RightObject.TopMargin;

Haven’t check it but should work.

   

Manuel L., Member
Posted: 21 March 2012 09:55 AM   Total Posts: 99   [ # 5 ]
inSertCodE - 21 March 2012 09:52 AM
stage.scaleMode StageScaleMode.NO_SCALE;
stage.align StageAlign.TOP_LEFT;

stage.addEventListener(Event.RESIZEonResize);

private function 
onResize(event:Event null):void
{
_view
.width stage.stageWidth LeftMargin RightMargin;
_view.height stage.stageHeight TopMargin BottomMargin;
_view.LeftMargin;
_view.TopMargin;

Haven’t check it but should work.

yes, thank you, but the problem comes with the 2d objects, doesnt? i have to scale 2d and 3d both.

   

inSertCodE, Sr. Member
Posted: 21 March 2012 09:58 AM   Total Posts: 105   [ # 6 ]
Manuel L. - 21 March 2012 09:55 AM

yes, thank you, but the problem comes with the 2d objects, doesnt? i have to scale 2d and 3d both.

Yes, scale and place all objects on the stage 2d and 3d. Aahhh… I’ll edit my post above with full code. Check in few min.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X