You probably want to run code when the viewStack changes. Look at the ViewStack, I bet there is a change event.
martinosaint wrote: > Hi there, > > I have built a multiplage application in Flex with different user roles. I > use a View Stack with a Menu Bar to navigate between the different pages. > > However - each time a page gets opened, I need to do some database calls, > apply User Role settings, etc. in an init() function. This init function may > reference some UI elements of this page. > > I tried to load it with the "creationComplete" event, but this one gets only > triggered once (since the page is not rebuilt each them the view stack shows > it). > > Now I have put it on the "show" event, but this seems not to get triggered > consistently, or before the page is fully created the first time. > > Whats the best practice for this case? > * I have to pass in data > * Call init functions (database calls) > * Manipulate components > > Ideally I would need a way to call init each time the page is loaded and > after all components are created. > > Thanks for your help, > Martin > > > > ------------------------------------ > > -- > 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 > > > > > -- Jeffry Houser, Technical Entrepreneur Adobe Community Expert: http://tinyurl.com/684b5h http://www.twitter.com/reboog711 | Phone: 203-379-0773 -- Easy to use Interface Components for Flex Developers http://www.flextras.com?c=104 -- http://www.theflexshow.com http://www.jeffryhouser.com -- Part of the DotComIt Brain Trust

