> how can I call master.mxml functions from navigation.mxml parentApplication.myFunction() Gordon Smith Adobe Flex SDK Team
________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ryanharlin Sent: Monday, December 03, 2007 12:26 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: accessing nested objects... what am I missing?!?! Thanks for the help. Your solution worked in practice but I do still get an error prior to compiling. If I ignore the error and compile, though, it works. But similarly, I want to be able to call functions that are in these different mxml files. So if I have an mxml file called navigation.mxml embedded in the master app file called master.mxml, how can I call master.mxml functions from navigation.mxml? Back from the flash days, I thought this would work: root.myFunction(); but it doesn't. I'm sure this problem is related to my earlier post, that's why I have it in the same thread. thanks, ryan --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "ryanharlin" <[EMAIL PROTECTED]> wrote: > > I have a simple enough question, I think. But I've been struggling > with it for two days. > > I have an mxml application which has a viewstack in it. The children > in the viewstack are <fr: tags for other mxml files > > It looks like this: > > <mx:ViewStack id="mainScreens"> > <fr:interfacePanel id="interfacePanel" /> > <fr:otherPanel id="otherPanel" /> > </mx:ViewStack> > > In the mxml file called interfacePanel I have another viewstack with > interface screens on them. > > How can I select different children of that viewstack from the main > mxml app. > > I would think I'd do something like this: > > <mx:button > click="mainScreens.interfacePanel.secondViewstack.selectedChild = > Page2;" /> > > But that doesn't work. > > Does anyone know the method of addressing object across multiple > nested mxml files? > > Thanks! Hopefully someone can show me what I'm missing. >