Viewport scaling

Software: Away3D 4.x

bartek, Newbie
Posted: 05 March 2012 08:00 AM   Total Posts: 1

hello everyone smile

Let’s look for example at https://github.com/away3d/away3d-examples-fp11/blob/master/src/Intermediate_MouseInteraction.as.

When you compile it and run, then try to resize window of flash player. Scaling of viewport depends on height of windows. How can I avoid this situation? I want to have plane 500x500, that is ALWAYS 500x500 on the screen, independently if window is 1000x1000px or 2000x1000px.

thanks,
Bartek

   

bardo, Member
Posted: 05 March 2012 05:04 PM   Total Posts: 79   [ # 1 ]

private function onResize(event:Event = null):void
  {
  view.width = stage.stageWidth;
  view.height = stage.stageHeight;
  SignatureBitmap.y = stage.stageHeight - Signature.height;
  awayStats.x = stage.stageWidth - awayStats.width;
  }

change there the dimensions

   

bardo, Member
Posted: 05 March 2012 05:15 PM   Total Posts: 79   [ # 2 ]

or cancel viewport dimension setting on the resize handler

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X