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);
}

Comments

Oxi said…
Thanks for sharing this - helped me alot
Really i appreciate the effort you made to share the knowledge.The topic here i found was really effective to the topic which i was researching for a long time
DVD multimedia storage
Promo Disc said…
Hi there. Very cool website!! Man .. Beautiful .. Wonderful .. I will bookmark your site and take the feeds also…I’m happy to locate a lot of useful information right here within the post. Thank you for sharing.
Eco Disc

Popular posts from this blog

Upload Video to Facebook Using Actionscrpt 3.0

Angular4 - primeng, ngx-bootstrap

Configure PostgreSQL and phpPgAdmin in WAMP

Save image from Flash using Node.js and Socket.io

Flash FLV player using PHP