1 Reply Latest reply on Feb 18, 2008 12:17 AM by tinylion_uk

    Parallel effect with filters do not work for ViewStack

    jdboer
      I'm trying all kinds of stuff to get a ViewStack on which the new selectedChild is put on top without the old one without the old view is removed first. With normal hide and show effects the old one is first removed before the new one is shown.
      After searching through the net a lot, I found some clues that a parallel effect should be used with 'hide' and 'show' filters on the effects in the parallel filter. When I run this code however, both filters are applied on the view which is shown and none on the view that is hidden.
      Reading the Flex SDK on the Effect.filter property, it says the captureStartValues() method must be called before playing the effect. I suspect this method is not called, because the Parallel effect is used in combination with a ViewStack and not for a Transition.
      I tried to call this method by creating a custom function which 1) ends the parallel effect, 2) calls the captureStartValues() method and 3) plays the effect. This method is called on the ViewStack.change event. All views in the viewstack are the targets of the parallel effect. This doesn't work either. The views change, but none of the effects are applied. If I remove the filters, the effect is applied. So it seems to me the start values are either not captured or because no values could be captured because they're already 'gone'.

      So how can I get this working? The Effect events are not usefull, because on effectStart the event has already started. Why can't the captureStartValue always be called when filters are applied ?

      Below the code of my testcase.