Use bounding box dimensions of the plane to calculate it's width and from there 
edge location is not a problem 

Sent from my iPhone

On Feb 23, 2011, at 5:25 PM, jens lofberg <[email protected]> wrote:

> Hi (and thanks for a great tool)
> I need to calculate how close to the camera I put a plane so the space 
> between the plane edge and the screen edge is always the same.
> The size of the plane is dynamic.
> 
> For now I start my sceen by moving my plane in z until I get the good size, 
> using:
> 
> public function getScreenSize():Object {
>            var sessionContainer:DisplayObjectContainer = 
> _view.session.getContainer(_view) as DisplayObjectContainer;
>            var drawnObject:DisplayObject = sessionContainer.getChildAt(0);
>            return (drawnObject.getRect(this))
> }
> 
> Does anyone know a Math formula doing the same thing?
> Thanks
> 
> jens lofberg
> www.cubedesigners.com

Reply via email to