View3D render disappearing on stage resize. 

Software: Away3D 4.x

Cheesemaster64, Newbie
Posted: 12 February 2013 06:07 AM   Total Posts: 4

Hello.

As the title states, when the stage is resized the view’s render disappears. There is still a red outline of where the view should be rendering.

What I want to achieve is, when the stage is resized I want the view also to be resized.

I am not publishing as HTML, just the swf in the flash player. I read somewhere that I might have to “reinitialize the view”, but I am not sure how to do this.

Anyone have any ideas?

   

Desmond Miles, Newbie
Posted: 12 February 2013 09:15 PM   Total Posts: 3   [ # 1 ]

I am experiencing the exact same problem. Could someone help please?

   

Ankur, Jr. Member
Posted: 12 February 2013 09:22 PM   Total Posts: 43   [ # 2 ]

I am also having issues regarding the resizing but not exactly same as the op. I am trying to load my away3d game swf file inside another swf file, but its width and height are too big to fit in the container in the main swf. I do not know how to resize the view to fit in the external files.

I tried using this.height, super.height, stage.height but nothing works. I guess its got something to do with view3d.

   

Desmond Miles, Newbie
Posted: 12 February 2013 10:30 PM   Total Posts: 3   [ # 3 ]

I noticed that the Away3D scene disappears on window resize only in debug mode. After compiling to a projector file, the scene was resizing properly.

Another issue I had was when exiting fullscreen mode from the projector - the scene disappeared again. It was because I was enabling fullscreen mode immediately on startup. I solved it by adding a CONTEXT3D_CREATED listener:

myView.stage3DProxy.addEventListener(Stage3DEvent.CONTEXT3D_CREATED, onContext3DCreate);

protected function onContext3DCreate(event:Event):void {
    stage.align = StageAlign.TOP_LEFT;
    stage.displayState = StageDisplayState.FULL_SCREEN;
    stage.scaleMode = StageScaleMode.NO_SCALE;
    myView.width = stage.stageWidth;
    myView.height = stage.stageHeight;
}

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X