Hi Alex/Gordon The problem with assigning IDs is that the popup container has that close button (the path that I gave) when you create the actual popup. For example the button that I gave an example with no path to the root (ConfirmScreen388.UIComponent418.Button422), is created by just setting this flag 'showCloseButton="true"' in the code below. I need to be able to find a way to identify that button or any other DisplayObject that I want to monitor for clicks and then execute those clicks on a different instance of the same .swf. I have not found a good way to do this and if you can help me understand how you render your DOM in flex (at least the part that will help me do this) it would be greatly appreciated. <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" close="PopUpManager.removePopUp(this)" showCloseButton="true"> Thanks, Zoran
--- On Tue, 8/12/08, Alex Harui <[EMAIL PROTECTED]> wrote: From: Alex Harui <[EMAIL PROTECTED]> Subject: RE: [flexcoders] AS 3.0 event target problem!!! To: flexcoders@yahoogroups.com Date: Tuesday, August 12, 2008, 9:38 PM He’s surprised that the popup isn’t parented by the app. Popups are parented by the systemMgr which also parents the app. Id’s are per-document (or per-mxml file) so you can traverse documents and pull objects by their ids. From: [EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] ups.com ] On Behalf Of Gordon Smith Sent: Tuesday, August 12, 2008 7:54 PM To: [EMAIL PROTECTED] ups.com Subject: RE: [flexcoders] AS 3.0 event target problem!!! What do you mean by "I don't have the path to the root"? If you assign an id to each component, the toString() method will use that instead of a dynamically generated name like Button498. Gordon Smith Adobe Flex SDK Team From: [EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] ups.com ] On Behalf Of zoran_101 Sent: Tuesday, August 12, 2008 4:30 PM To: [EMAIL PROTECTED] ups.com Subject: [flexcoders] AS 3.0 event target problem!!! I have an interesting problem regarding event.target in Flex 2/ActionScript 3.0. I am using the Flex Grocer app in order to try something out. I am attaching listeners to all the click events and then printing out event.target to keep track of my events and where we clicked, nothing revolutionary here very easy stuff. Once I get the paths I would like to run code that will execute my steps and play the clicks back based on the event.target information that I got and I was able to do that except when we have popups. Here is the problem: When I execute a click on a button with event.target = DataEntry0._ UpdateDeleteProd 1.Form10. FormItem102. HBox103.Button10 4 A poupup appears and then I click on the close button on that popup with event.target= ConfirmScreen464. UIComponent494. Button498 COUPLE OF PROBLEMS HERE: 1) I don't have the path to the root (DataEntry0) even though I use the standard event.target. 2) This is even a bigger problem, the DOM path (ConfirmScreen464. UIComponent494. Button498) is dynamically generated (the numbers are dynamically generated) so when I use that path that I got during the time I was monitoring the app, when I use my code to play the events that very same target does not correspond to the popup that the fist event caused. I tried using IDs but in Flex I have not found anything like document.getElement ById() that is available in JavaScript. Any help on this will be greatly appreciated. Thanks p.s. I looked at the automation library that Flex has (and Mercury QTP uses) but that will not work for me.