Re: [Flashcoders] Dispatch Event works only with SetTimeout

2008-05-19 Thread Helmut Granda
Yeah, that makes sense and also i think that is why when I call the init function after the new item has been created it works. Thanks all for your input. On Mon, May 19, 2008 at 2:10 PM, Eduardo Omine <[EMAIL PROTECTED]> wrote: > I think the issue is that you must add the event listener before t

Re: [Flashcoders] Dispatch Event works only with SetTimeout

2008-05-19 Thread Eduardo Omine
I think the issue is that you must add the event listener before the event is dispatched. When you call: var mm = new MyMessage; The MyMessage.DONE event is immediately fired. But mm only starts listening to that event when you reach the next line of code: mm.addEventListener(MyMessage.DONE, theCo

Re: [Flashcoders] Dispatch Event works only with SetTimeout

2008-05-19 Thread eric e. dolecki
and technologies? > Check out our internal GT&O Innovative Learning Blog & subscribe. > > > > >>-Original Message- > >>From: [EMAIL PROTECTED] > >>[mailto:[EMAIL PROTECTED] On Behalf > >>Of Helmut Granda > >>Sent: Monday, May

RE: [Flashcoders] Dispatch Event works only with SetTimeout

2008-05-19 Thread Merrill, Jason
da >>Sent: Monday, May 19, 2008 2:08 PM >>To: Flash Coders List >>Subject: [Flashcoders] Dispatch Event works only with SetTimeout >> >>Hi all, >>I have an issue trying to dispatch a simple event. >>dispatchEvent(new Event(ClassName.EVENT_NAME)); >&g

[Flashcoders] Dispatch Event works only with SetTimeout

2008-05-19 Thread Helmut Granda
Hi all, I have an issue trying to dispatch a simple event. dispatchEvent(new Event(ClassName.EVENT_NAME)); for some reason the event is not being triggered -unless- i put a time out before it... like so: setTimeout(doDispatch, 1); private function doDispatch () : void { dispatchEvent(new Event