1 Reply Latest reply on Oct 21, 2011 10:45 AM by chiedozi

    FlipTransition raises "Removed from Stage Event" on new view

    NilsTT

      hello,

       

      I Have a problem with a fliptransistion. If I use this transition in my main view to go to a "settings" view. The "removed from stage" event is raised for the settings view (yes the settings view).

       

      So first the "initialize" of the settings view is executed. In this initialize I hook up some event listeners.

      Than the "removed from stage" of the settings view is executed. In this function I remove the event listeners (I think this is a good thing to do).

      Than the "removed from stage" of the settings view is executed again

       

      So the event listeners never work.

      The code for the transition is nothing special I think

       

      var ftrans:FlipViewTransition = new FlipViewTransition();

      ftrans.duration =1000;

      navigator.pushView(SettingsView, data, null, ftrans);

       

       

      When I use the default transition "navigator.pushView(SettingsView, data)" the problem does not occur.

       

      Anybody an idea as to how to solve this (I'd prefer to keep the fliptransition, as the default slide transition is used in another part the application, and the flip indicates to the user that he is doing something different).

       

      Update: I've tried to move the event listeners to the "added-to-stage" phase but this doesn't quite solve the problem the events that occur on the SettingsView are: (in that order!)

       

      - Added To Stage

      - Initialize (this is bizar the view is added to stage even before it is initialized).

      - Removed From Stage

      - Added To Stage

      - Removed From Stage

      - Added To Stage

       

      Message was edited by: NilsTT