I have a viewstack with multiple MXML components. I want to call a function doSomething() when a MXML component is loaded. I was calling this function on creationComplete property of the component. The issue is that the creationComplete method gets called only for the first time. and not when i come back to the same view again...
Try using the 'show' event. This event gets called every time the view gets shown. The opposite would be the 'hide' event.
Try calling the function in the change event of viewstack.In the change event check for the index of the particular mxml component and call the function.
<mx:ViewStack id="vsAdmin" width="100%" height="100%" change="ViewStackChange()" >
//Write the function for that mxml component
//write the function to be called for second component
Hope this helps you