Showing posts from July, 2010

Perspective problem in Flash native 3D

Nowadays am busy with some projects in flash using it's native 3D. In this post i like to share my experience with flash 3D. The native 3D in flash Player 10 is awesome. I used some flash coverflow and 3D picture gallery in project. First it seems very easy but soon i found that resizing of the stage cause some problems in the 3D perspective. I searched everywhere and found some wonderfull thing. Whenever we use 3D properties flash will automatically convert it to some bitmap and its in the 3D space. After that if we try to resize the stage and align the component according to the stage size flash projectioncenter will change . So we need to reset it by using the following code. stage.addEventListener(Event.RESIZE,onSize); private function onSize(e:Event) { root.transform.perspectiveProjection.projectionCenter=new Point(stage.stageWidth/2,stage.stageHeight/2); }