but I couldnt dispatch the onLoaded event in the initLayout method,
since that is actually called before the child components are actually
finished loading...or is that not right?  so are you saying should i
just need to dispatch the event in the onLoad method?





On 3/14/06, JesterXL <[EMAIL PROTECTED]> wrote:
> You cannot lose using onLoad.  Even if a component takes 1 frame to
> initialize because you are dragging it to the stage instead of creating
> dynamically, onLoad will always fire at the correct time.
>
> However, you outta abstract this to an event.  As you know, mx.core.View
> physically calls initLayout, but you could dispatch an event via
> EventDispatcher, and have anyone who cares register for it.
>
> function init()
> {
>     addEventListener("onLoaded", this);
> }
>
> That way, others can listen too.  If you are only using 1 component, then
> screw it, just use onLoad as an internal method.
>
>
> ----- Original Message -----
> From: "Rich Rodecker" <[EMAIL PROTECTED]>
> To: "Flashcoders mailing list" <[email protected]>
> Sent: Tuesday, March 14, 2006 6:12 PM
> Subject: [Flashcoders] using onLoad() in components
>
>
> i tried posted this before but wanted to bump it now that the list is
> back up, im not sure it went through the first time:
>
> i have a component which is made up of other components. Right now, I
> have an onLoad() set up that will set up the main component to listen
> for some events of the subcomponents.  It works fine, but I'm just
> wondering if this is the preferred way of doing it.
> _______________________________________________
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
> _______________________________________________
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to