If changeState() was public you could call Application.application.changeState() from the popup
________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of kalpkat9 Sent: Sunday, October 28, 2007 7:56 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Trigger a function in the main applicatoin mxml from a popup window. Thanks for taking your time to respond, Bjorn. I am triggering a function called submitData() from the click event of my button inside the popup window. private function submitData():void{ mainApp.currentState.name = "secondState"; } This doesnt seem to accomplish what I wish for (of changing the state of my mainApp.mxml) How is that I can access a function from my main application mxml, for example: changeState(). private function changeState():void{ currentState = "secondState"; } Please excuse my ignorance. Could you let me know what I am missing? Thank you. --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , Bjorn Schultheiss <[EMAIL PROTECTED]> wrote: > > Listen to the closeEvent from the popup and call the function from > the handler. > > Bjorn > > > On 29/10/2007, at 12:10 PM, kalpkat9 wrote: > > > Hi, > > > > This might be a really petty question to ask, but I will greatly > > appreciate if someone can answer. > > > > How can I trigger a function in my main application mxml, from a popup > > window(title window/panel) after a submit button click. (I am > > trying to > > change the state of my main application by clicking the submit button) > > > > Thank you, > > Kal. > > > > > > >