3 Replies Latest reply on Jun 24, 2009 2:55 PM by dzeikei

    Bypassing transitions when changing states

    dzeikei Level 2

      In one of my MXML component I have 2 states, say A and B, and a transition effect that plays for when state is changed.

      The default state for the component is A, but sometimes I want it to be already in state B when it shows, but it will play the transition effect from A to B, which I do not want.

      A quick solution would be having a dummy state C and two transition effects, one with toState = "A" and fromState = "B" and vice versa.

      So if I change my state  A->C->B or B->C->A it will bypass the transition effect.

      Another possibility was to temporarily remove the transitions when I didn't want them and put them back in after the state has changed.

      While these workarounds will probably work, it makes me uneasy. If there are any cleaner solutions i would like to hear them

      Thanks for reading!