----- Original Message ----- From: "Kevin Cannon" <[EMAIL PROTECTED]> To: <flashcoders@chattyfig.figleaf.com> Sent: Tuesday, May 22, 2007 3:11 PM Subject: Re: [Flashcoders] Coordinates and Stage align in Flexible UIs
> Hi, > > That looks very useful. I've one question though. How is the 'border > to stage position' information worked out? Is the some kind of > absolute top/left co-ordinates you can find? > > - Kevin > No, you calculate those using the original document width and height and the Stage.width and Stage.height. So you'll have to store the original width and height in variables. var origWidth:Number = 760; var origHeight:Number = 450; var offsetX:Number = (Stage.width - origWidth)/2; var offsetY:Number = (Stage.height - origHeight)/2; regards, Muzak _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com