Use Event.ADDED_TO_STAGE instead of creation-complete - you can also use init to construct listeners in the MXML although i have seen in the past this occasionally gets messy.
The reason behind this is that after the first hit of the event, you dont want it to occur again - in the MXML pattern there is no-way (unless created and destructed in code via the addEventListener / removeEventListener) to detach the event receiver. One elegant way is to subclass your MXML component from a custom class (actionscript code) in which you attach listeners in the class creation. Then in the MXML override these functions - its a nice way to get around these types of issues. Hope that helps - i sent through an earlier (this morning actually) post re something similar to this issue. On Sep 23, 2008, at 11:32 AM, Tom Chiverton wrote: > On Monday 22 Sep 2008, ozziegt wrote: >> I am using the event so the MXML component knows when it has been >> added to the stage, and also removed so it can set up and tear down >> some event listeners appropriately. > > I normally use creationComplete for setting up the listeners. > > -- > Tom Chiverton > Helping to widespreadedly envisioneer networks > > **************************************************** > > This email is sent for and on behalf of Halliwells LLP. > > Halliwells LLP is a limited liability partnership registered in > England and Wales under registered number OC307980 whose registered > office address is at Halliwells LLP, 3 Hardman Square, > Spinningfields, Manchester, M3 3EB. A list of members is available > for inspection at the registered office. Any reference to a partner > in relation to Halliwells LLP means a member of Halliwells LLP. > Regulated by The Solicitors Regulation Authority. > > CONFIDENTIALITY > > This email is intended only for the use of the addressee named above > and may be confidential or legally privileged. If you are not the > addressee you must not read it and must not use any information > contained in nor copy it nor inform any person other than Halliwells > LLP or the addressee of its existence or contents. If you have > received this email in error please delete it and notify Halliwells > LLP IT Department on 0870 365 2500. > > For more information about Halliwells LLP visit www.halliwells.com. > > ------------------------------------ > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Alternative FAQ location: > https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo > ! Groups Links > > > >

