thanks greg, and nice to know that either way is ok. don't want to start down 
bad habits already!
i've got it working now with a custom event and a little extra help from this 
as well: 
http://www.learningactionscript3.com/2008/11/11/passing-arguments-with-events/
cheers.


> Date: Thu, 19 Nov 2009 10:53:18 -0500
> Subject: Re: [Flashcoders] OOP and XML
> From: breakfastcof...@gmail.com
> To: flashcoders@chattyfig.figleaf.com
> 
> either way works... its a 6 of one half a dozen of another type situation
> 
> so you could say
> 
>     dispatchEvent(Event.COMPLETE) from your XMLLoader class and put the data
> into a public var that your class listening can access.
> 
> Or you could make a custom event like this
> 
>     dispatchEvent(new XMLEvent(XMLEvent.DATA_LOADED, loader.data));
> 
> where you send in the data into a custom event u make
> 
> hope this makes sense
> 
> greg
> 
> On Thu, Nov 19, 2009 at 10:38 AM, David Hunter 
> <davehunte...@hotmail.com>wrote:
> 
> >
> > thanks Henrik,
> > are you saying that i need to create a custom event class and dispatch an
> > event from that class? otherwise how else could i attach the data to a
> > dispatched event?
> > or do you mean to dispatch an existing event type so when fired the
> > DocumentClass will go into the XMLLoaderClass and grab a public var
> > containing the data?
> > i have never dispatched events before, so i guess i'll have to look into
> > it.
> > i have posted my two classes on pastebin to look at:
> > http://pastebin.com/m4ba8e745
> > cheers
> > > Date: Thu, 19 Nov 2009 13:58:45 +0100
> > > From: he...@henke37.cjb.net
> > > To: flashcoders@chattyfig.figleaf.com
> > > Subject: Re: [Flashcoders] OOP and XML
> > >
> > > Dispatch an event when the data is ready and have the main code listen
> > > for the event.
> > > _______________________________________________
> > > Flashcoders mailing list
> > > Flashcoders@chattyfig.figleaf.com
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> >
> > _________________________________________________________________
> > Got more than one Hotmail account? Save time by linking them together
> >
> > http://clk.atdmt.com/UKM/go/186394591/direct/01/_______________________________________________
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
                                          
_________________________________________________________________
Add your Gmail and Yahoo! Mail email accounts into Hotmail - it's easy
http://clk.atdmt.com/UKM/go/186394592/direct/01/_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to