Hi,
Thank you for the help but non of these methods seem to help.
The repeater I use is in a canvas that sits in a tab navigator that
sits in a vbox in an application.
All in different components.

I have tried to open the dialog:
var pt:Point = new Point(event.stageX, event.stageY);
pt = event.target.contentToGlobal(pt);
this.renameTagDlg.x = pt.x;//
this.renameTagDlg.y = pt.y;//

I've changed the contentToLocal to all 6 possibilities but none of
them work. 
contentToGlobal,contentToLocal,globalToContent,globalToLocal,localToContent,localToGlobal

I have even tried to get the X,Y of the mouse globalyy and just open
the dialog there but that didn't work too.

I think that jer_ela was on the right track but I just can subtract
all the containers X & Y.

THIS IS SO FRUSTRATING..... 

--- In flexcoders@yahoogroups.com, "Robert Chyko" <[EMAIL PROTECTED]> wrote:
>
> or if your container uses absolute positioning you would need to use
> contentToGlobal
>  
> 
>       -----Original Message-----
>       From: flexcoders@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On Behalf Of Keun Lee
>       Sent: Friday, February 23, 2007 2:09 PM
>       To: flexcoders@yahoogroups.com
>       Subject: Re: [flexcoders] Re: How to get the real X & Y of a
> repeater item
>       
>       
> 
>       Hey you might want to also look into "localToGlobal" 
>       
>       I.e
>       
>                       var comp : UIComponent = UIComponent(
> event.target );                var point : Point = comp.localToGlobal(
> new Point( comp.x, comp.y ) );                trace( point.x + ":" +
> point.y );
>       
>       -Keun
>       
>       
>       On 2/22/07 9:24 AM, "jer_ela" <[EMAIL PROTECTED]> wrote:
>       
>       
> 
>               
>                
>                
>               
>               The following code gets the x and y positions of an
> image that has
>               been clicked on that was generated by a repeater.
> Getting the coords
>               for a button should be pretty much the same.  
>               
>               stageX and Y are the x and y coords of the mouse
> position relative to
>               the application stage. mainCanvas is a direct child of
> the application
>               and is the container that I want the coords relative to.
> If you have
>               additional containers between the stage and the one you
> need coords
>               relative to, you have to subtract the x and y at each
> level to get
>               from stage coords to that container's coords.
> Subtracting the mouseX
>               and Y moves the coords from the point or the click to
> the upper left
>               corner of the image.
>               
>               selectedImage.x = event["stageX"] - mainCanvas.x 
>                - event.currentTarget.mouseX;
>               selectedImage.y = event["stageY"] - mainCanvas.y 
>                - event.currentTarget.mouseY;
>               
>               --- In flexcoders@yahoogroups.com
> <mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.com>  , "zipo13" <zipo13@> wrote:
>               >
>               > Hi,
>               > In my app I create a repeater the generats VBoxes each
> with button
>               in it.
>               > When the user clicks on the button I want to generate
> a small dialog
>               > that will open up under the button.
>               > I know how to get the repeater current item and target
> and current
>               > target but I can't find the real X & Y of the button.
>               > Am I going in the wrong direction?
>               >
>


Reply via email to