Hi Mark..

here is some code hope it helps you on to a solution
<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> " layout="absolute">

<mx:Script>
  <![CDATA[
   import mx.controls.Button;

     import mx.utils.StringUtil;

  private function button_clickHandler(event:MouseEvent):void
  {
   var local:Point;
   if(event.target.constructor == Button)
    local = new Point(event.localX,event.localY);

   var global:Point = this.localToGlobal(local);
    textArea.text += StringUtil.substitute("TopLeft: {{{0}, {1}}}\n",
global.x, global.y);
  }

]]>

</mx:Script>
             <mx:Button x="0" y="0" label="Get coordinates"
click="button_clickHandler(event)"/>
             <mx:TextArea id="textArea" right="0" left="0" bottom="0"
top="30"/>
</mx:Application>


Cato Paus
http://www.umbrellacorp.no




--- In flexcoders@yahoogroups.com, "Mark Ingram" <[EMAIL PROTECTED]> wrote:
>
> Hi, if I have an application within an application, how can I convert
> coordinates from the child app to the parent app? I need to display a
> popup window and if I use the x, y values from the child application,
> they are set to zero, but when loaded into a parent app, they are
> actually around 200, 200.
>
>
>
> |-------------------------|
>
> | Parent |
>
> | |
>
> | |----------| |
>
> | | Child | |
>
> | |----------| |
>
> | |
>
> | |
>
> |-------------------------|
>
>
>
> Both parent and child are flex apps. But the x,y values for child are
> {0,0}. I want to popup a dialog which completely covers the child
> application, from within the child app.
>
>
>
> Any ideas?
>
>
>
> Thanks,
>
>
>
> Mark
>


Reply via email to