[flexcoders] Re: why I can not dispatchEvent with creationComplete?

2009-01-05 Thread bartalcorn
Mark, dispatchEvent(new Event(loginEvent, false)); The second parameter above, false, means the event will not bubble up. Unless you are going to be adding an eventListener to this Canvas, you most likely want that second parameter to be true. HTH, Bart --- In

[flexcoders] Re: why I can not dispatchEvent with creationComplete?

2009-01-05 Thread markflex2007
But it works with button click event like following. mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; mx:Metadata [Event(name=loginEvent, type=flash.events.Event)] /mx:Metadata mx:Script ![CDATA[ private function

Re: [flexcoders] Re: why I can not dispatchEvent with creationComplete?

2009-01-05 Thread Ralf Bokelberg
Maybe nobody is listening when you dispatch the event? How do you add the listener? Ralf. On Mon, Jan 5, 2009 at 8:42 PM, markflex2007 markflex2...@yahoo.com wrote: But it works with button click event like following. mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; mx:Metadata

[flexcoders] Re: why I can not dispatchEvent with creationComplete?

2009-01-05 Thread markflex2007
Hi, I list the demo code here. CASE one mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=justLogin() mx:Metadata [Event(name=loginEvent, type=flash.events.Event)] /mx:Metadata mx:Script ![CDATA[ private

[flexcoders] Re: why I can not dispatchEvent with creationComplete?

2009-01-05 Thread valdhor
I seem to remember seeing a post by Alex Harui that said mouse click events have bubbling set to true by default. You code will work if you set bubbling to true (I have tested it). --- In flexcoders@yahoogroups.com, markflex2007 markflex2...@... wrote: But it works with button click event like

Re: [flexcoders] Re: why I can not dispatchEvent with creationComplete?

2009-01-05 Thread Manish Jethani
On Tue, Jan 6, 2009 at 1:34 AM, markflex2007 markflex2...@yahoo.com wrote: [snip] I have addEventListener in Mediator page, it works for CASE two but not work for CASE one. it seems dispatchEvent can not work with creationComplete. why? How to fix it. It works, but your event listener

[flexcoders] Re: why I can not dispatchEvent with creationComplete?

2009-01-05 Thread stldvd
I'm having a similar issue. Event is dispatched (I can step through code and see it) but the event listener is never hearing it, and so the listener function is never being fired. How does one tell if the listener is ready or not? If you add the listener on the creationcomplete or initialize

RE: [flexcoders] Re: why I can not dispatchEvent with creationComplete?

2009-01-05 Thread Tracy Spratt
] Re: why I can not dispatchEvent with creationComplete? I'm having a similar issue. Event is dispatched (I can step through code and see it) but the event listener is never hearing it, and so the listener function is never being fired. How does one tell if the listener is ready or not? If you

[flexcoders] Re: why I can not dispatchEvent with creationComplete?

2009-01-05 Thread stldvd
To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: why I can not dispatchEvent with creationComplete? I'm having a similar issue. Event is dispatched (I can step through code and see it) but the event listener is never hearing it, and so the listener function is never being fired. How

Re: [flexcoders] Re: why I can not dispatchEvent with creationComplete?

2009-01-05 Thread Josh McDonald
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of stldvd Sent: Monday, January 05, 2009 4:48 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: why I can not dispatchEvent with creationComplete? I'm having a similar

[flexcoders] Re: why I can not dispatchEvent with creationComplete?

2009-01-05 Thread stldvd
Of stldvd Sent: Monday, January 05, 2009 4:48 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: why I can not dispatchEvent with creationComplete? I'm having a similar issue. Event is dispatched (I can step through code and see it) but the event listener is never

Re: [flexcoders] Re: why I can not dispatchEvent with creationComplete?

2009-01-05 Thread Josh McDonald
, 2009 4:48 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: why I can not dispatchEvent with creationComplete? I'm having a similar issue. Event is dispatched (I can step through code and see it) but the event listener is never hearing it, and so

RE: [flexcoders] Re: why I can not dispatchEvent with creationComplete?

2009-01-05 Thread Tracy Spratt
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of stldvd Sent: Monday, January 05, 2009 6:05 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: why I can not dispatchEvent with creationComplete? Thanks for the help so far

RE: [flexcoders] Re: why I can not dispatchEvent with creationComplete?

2009-01-05 Thread Tracy Spratt
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Tracy Spratt Sent: Monday, January 05, 2009 6:56 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: why I can not dispatchEvent with creationComplete? SystemManager is the parent of Application

[flexcoders] Re: why I can not dispatchEvent with creationComplete?

2009-01-05 Thread stldvd
@yahoogroups.com Subject: RE: [flexcoders] Re: why I can not dispatchEvent with creationComplete? SystemManager is the parent of Application. Set the listener on that and it will hear all events, including from Application and from pop-ups. But events propagate *up*. If you dispatch