Matt: Am I doing something wrong because my event listeners aren't triggering anything... the code is all the way at the bottom.
If you have a moment. Thanks Patrick Matt Chotin wrote: > > If you're using UIComponents then it should work, the events should > bubble. > > -----Original Message----- > From: [email protected] <mailto:flexcoders%40yahoogroups.com> > [mailto:[email protected] > <mailto:flexcoders%40yahoogroups.com>] On > Behalf Of {reduxdj} > Sent: Monday, November 27, 2006 8:36 PM > To: [email protected] <mailto:flexcoders%40yahoogroups.com> > Subject: Re: [flexcoders] Event Propogation - how to bubble up through > components?? > > Matt: > > I'm adding UIComponents to the display list - I guess that wouldn't work > > this way. > What's the best way to propagate a method to UIComponents? > > Can I just create new UIObjects and add them as children to my display > list or do I have to create class files > and extend my classes that way? > > As you see I'm relatively new to flex and I thank you for your time. > > patrick > > Matt Chotin wrote: > > > > Is the whole parent hierarchy DisplayObjects? Bubbling will only go > > through UI objects, if you had something that didn't extend > > DisplayObject in there it won't bubble up (all of the Flex visual > > components are DisplayObjects) > > > > > ---------------------------------------------------------- > > > > *From:* [email protected] > <mailto:flexcoders%40yahoogroups.com> > [mailto:[email protected] <mailto:flexcoders%40yahoogroups.com>] > > > *On Behalf Of [EMAIL PROTECTED] <mailto:%2Adj%40reduxdj.org> > > *Sent:* Monday, November 27, 2006 5:39 PM > > *To:* [email protected] <mailto:flexcoders%40yahoogroups.com> > > *Subject:* [flexcoders] Event Propogation - how to bubble up through > > components?? > > > > I'm using bubbling, or at least i think i am to capture an event... > > I've extended the event class to make my own event mechanism. the > > events are being dispatched, however the problem is, that > > I'm adding an event listener to my custom mxml component to receive > > the events and nothing happens. I've probably got something > > backwards... > > > > Isn't there a way to listen to events from the parent document? > > > > Doesn't bubbling set to true allow the event > > to be captured by any component in the order that they are created? > > > > my code is as follows: > > > > var evt:MeEvent = new MeEvent(MeEvent.REMOTE,true); > > dispatchEvent(evt); > > > > ----------------------------------- > > > > package com.me > > { > > import flash.events.Event; > > > > public class MeEvent extends Event > > { > > > > > > public static const REMOTE:String = "remote"; > > > > public var realTarget:*; > > > > public function MeEvent(type:String, bubbles:Boolean=true, > > cancelable:Boolean=false) > > { > > super(type, bubbles, cancelable); > > } > > } > > } > > > > -------------------------------------- > > And inside my custom component this is the event listener. > > > > private function init():void{ > > this.addEventListener(MeEvent.REMOTE, handleEvent); > > } > > > > Thanks for your time, > > Patrick > > > > > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > <http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt> > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.com > <http://www.mail-archive.com/flexcoders%40yahoogroups.com> > Yahoo! Groups Links > >

