I need to call a function located in the parent component and make the call from the child component in Flex 3. Is the开发者_如何学JAVAre a way to access functions in the parent component from the child component? I know I can dispatch an event in the child and add a listener in the parent to call the function, but just wanted to know if could also directly call a parent function from a child. Thanks
You can use parentApplication
For example... if i have a main.mxml that calls a component we'll call child.mxml, i can call functions in main from within child by doing the following:
parentApplication.parentsFunctionName(parameters);
精彩评论