Thanks for your help, I ended out picking up the string value of the element in the listener:
var str:String = event.target.valueOf(); Then finding if it was the element I did not want the listener to work on. if ( str.search("displayPeople") >= 1) Might not be the most elegant solution, but it works a treat. Thanks Shaun McCran To: flexcoders@yahoogroups.com From: huss.stu...@gmail.com Date: Thu, 2 Apr 2009 11:03:55 +0000 Subject: [flexcoders] Re: Creating exceptions to an eventlistener You are using event.currenttarget but this always points to the current object (the clue is in the name). Try using event.target and that might help. I hope so. Best of luck with it. --- In flexcoders@yahoogroups.com, shaun mccran <s_mcc...@...> wrote: > > > Hi, > > > > I'm using > > > > outerCanvas.addEventListener( MouseEvent.MOUSE_DOWN, moveWindow ); > > > > where outerCanvas is the canvas that holds another canvas, that hold the > datagrid (whew!) > > > > So "trace(event.currentTarget)" always returns phoneBook0.outerCanvas, > (phoneBook is the app name) > > > > So I'm unable to trap where the event has been fired from? > > > > > Thanks > > Shaun > > > > > > > To: flexcoders@yahoogroups.com > From: timh...@... > Date: Wed, 1 Apr 2009 18:31:50 +0000 > Subject: [flexcoders] Re: Creating exceptions to an eventlistener > > > > > > > Hi, > > First, make sure, in the Canvas tag, that mouseChildren="true". You can > also check in the drag event handler function if the currentTarget is a > canvas or not: > > if ( !event.currentTarget is Canvas ) > { > event.stopImmediatePropagation; > } > > There are probably better ways to do this, but this is a quick fix. > > -TH > > --- In flexcoders@yahoogroups.com, "smccran" <s_mccran@> wrote: > > > > Hi all, > > > > I've got a canvas with an event listener, that allows the user to drag > the canvas around. > > > > The only problem is that I have a datagrid inside this canvas, and the > event listener is interfering with it. > > > > IE I cannot drag the slider in the datagrid, or resize the column etc, > as the event listener kicks in and moves the whole canvas instead. > > > > How can I create an exception for the datagrid? > > > > Thanks > > Shaun > > > > > > > > > > > > __________________________________________________________ > View your Twitter and Flickr updates from one place – Learn more! > http://clk.atdmt.com/UKM/go/137984870/direct/01/ > _________________________________________________________________ Share your photos with Windows Live Photos – Free. http://clk.atdmt.com/UKM/go/134665338/direct/01/