I am a bit new to flex. I have this problem with ViewStack.
I have a viewstack that has 3 children:
While I am in canvas3, when i pressed a buton it will go to canvas2, I want to pass an object to canvas2 and execute some method. Since canvas2 is not yet created and the complete event will be fired after the component is completed. I don't want to use [Bindable] annot variable to pass to canvas2 property.
How can fire another event aside from complete event to pass the through custom event?
Or is there a better way to pass around object between ViewStack children?
Thanks a lot.
One of the preferred ways to share data among Flex components is to use a MVC architecture, that way the 2nd view just accesses the data from the model.
Here is my Flex cookbook post on implementing a simple MVC pattern:
Another way is to just have the data in the main application as a public variable and use mx.core.Application.application.myVarName to access the data.
If this post answers your question or helps, please mark it as such. Thanks!
Adobe Flex Development and Support Services