Why call addEventListener() yourself? If you simply put an mouseDown or whatever event atttribute on your content item in MXML, it should work fine; addEventListener() will get called for you when the content item gets created.

 

- Gordon

 


From: [email protected] [mailto:[email protected]] On Behalf Of Sascha Balkau
Sent: Friday, August 18, 2006 5:28 AM
To: [email protected]
Subject: [flexcoders] How to set EventListeners to undrawn components on a ViewStack?

 

Hi list,

I'm using a LinkBar with a ViewStack and on any of the ViwStack contents I
have a button that needs to get a MouseEvent listener.

When I start the app, I get an exception ": Cannot access a property or
method of a null object reference." Because all the buttons on the VieStacks
that have not yet been drawn are not defined for the AddEventListener.

Is there an easy workaround for this situation?

Thanks,
Sascha

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to