I haven't tried this out, but maybe if you append this to your code:

popup.move(Stage.width * .5 - popup.width * .5, Stage.height * .5 -
popup.height * .5);

On 7/8/05, chris.alvarado <[EMAIL PROTECTED]> wrote:
> good afternoon everyone,
> 
> i have a but that loads a popup window with a form in it. i need to
> position that window the in center of my app.
> 
> what is the best way to go about this?
> 
> my popup function looks like this:
> 
> private function showPopup(modal) {
>             var popup =
> mx.managers.PopUpManager.createPopUp(_root,
> AddForm, modal, {deferred: true});
>         }
> 
> 
> i know i can pass the x and y coords as part of the initialization
> object for the window, but i cant figure out how to dynamically
> determin the height and width of the app and the window im creating in
> order to position the window in the center.
> 
> -- 
> -chris.alvarado
> [application developer]
-- 
Daniel Cascais
Tel: +56 (0)2  4589495
Cel: +56 (0)9  9417355


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to