Viewstack Transitions in Flex 4

So I’m busy with a project building an Adobe AIR application where at this point I’m working out the layout of the application.

Transitions are usually very simple to accomplish with state transitions, but in my framework of the application I wanted to avoid using states between the different pages that were to be shown. Using transitions on a page defined in a NavigatorContent item within the ViewStack showed to be a syntactically slightly different world.

To cut the story telling, here’s a snippet of code from my project that one can use to accomplish some fading effects on the NavigatorContent within a ViewStack.

The declarations:


     
    

and the ViewStack:


    
        
    
    
        
    

where, of course, PageIntro and PageProjects are some defined components not included in this code.

Pretty obvious, isn’t it? 🙂