That's bs!

:: goes to find dang MC ::

Got it.  You need to use localToGlobal, taking into account your lowest 
container.  AND, you need to wait a frame since the Alert takes a while to 
init.

So, something like (assuming yourMainForm is in a Canvas):

function theAlert()
{
    my_alert = Alert.show("something");
    doLater(this, "onPos");
}

function onPos()
{
    var theX = yourMainForm.x + (yourMainForm.width / 2);
    var theY = yourMainForm.y + (yourMainForm.height / 2);
    theX -= my_alert.width / 2;
    theY -= my_alert.height / 2;

    var point = {};
    point.x = theX;
    point.y = theY;
    theCanvas.localToGlobal(point);

    my_alert.move(point.x, point.y);
}

----- Original Message ----- 
From: "Daniel Cascais" <[EMAIL PROTECTED]>
To: <flexcoders@yahoogroups.com>
Sent: Wednesday, February 22, 2006 11:25 AM
Subject: Re: [flexcoders] Positioning Alert


Ok… sorry for the late reply (my day seems to only have 12 hrs).

I tried using the 4th parameter in show() and the results are exactly
the same. You can see two screenshots here:

http://www.cascais.cl/images/deletable/alertposition1.png
http://www.cascais.cl/images/deletable/alertposition2.png

The first one is using "this" as a parent reference, which has the
same outcome when I use the accordion as a parent.

The second is using no parent reference, which gives the same result
as referencing the Application.

I included another image that shows just about where the Alert should 
appear:
http://www.cascais.cl/images/deletable/alertposition3.png


Oh, and Jesse… Remind me to get you a beer next time we meet up.
--
Daniel Cascais


--
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








--
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