0 Replies Latest reply on Jan 28, 2011 8:02 AM by cainunable

    State Transition to Center a Popup


      I am relatively new to Flex, but have been given the opportunity to work on a great Flex project at work. For the most part things are going well, but I have run into a small problem that I have not been able to find a straightforward solution to.


      I have a popup window inside my main application that has multiple states.  Each state may be a different width and height.  I have done some transition animations so that the window does a resize and a move in parallel. Here's the issue:  How do I create the transitions so that the new state is centered properly in the window?  I am currently doing something like (parent.width - this.width)/2 but that seems like it is based of the current state's size and not the new state's size.  Any tips on the best way to handle this?