I am trying to get my head around custom components. I am working with MXML custom components. I have a button and when this button is clicked I need to access a function on the main application page. I know this violates the encapsulation recommendations but the function I am calling is common to a few custom components. What is the best way to handle this. I thought I could use outerDocument.functionName from within the custom component but I get an error. And here is a question that may explain why I am having such a hard time with this concept. If custom components are just like the built in components then why is the button component built so it can access functions on the main application page. I am a flex noobie. Can you tell. Appreciate all the help.
Youcan use the mx.core.Application.application static property to reference the application object. See the "Passing references to properties of MXML components" section of the Flex doc on this page:
Once again. Excellent response