0 Replies Latest reply on Aug 3, 2007 2:55 PM by thatadbobestephen

    Changing transition effects at runtime

    thatadbobestephen
      I want to allow users to change the effect used on transtions on a
      presentation app I'm building. I have a set of effects defined and
      then use a switch statement to select between each effect. The problem
      is that the switch of effect is only applied once and application
      restart (in a standalone projector) is required to apply a different
      effect.

      What can I do to switch between effects used in a transition without
      an application restart?

      flex sdk 2.01
      Code sample
      ...
      case 1:
      chosenEffect.effect = slowZoom;
      break;

      case 2:
      chosenEffect.effect = myMove;
      break;
      ...

      myTran.effect = chosenEffect.effect;
      myTranback.effect = chosenEffect.effect;
      // I want flexibility about which state changes the effects apply to ;

      myTran.fromState = "*";
      myTran.toState = "*";

      myTranback.fromState = "state2";
      myTranback.toState = "state1";

      transitions.push(myTran);
      transitions.push(myTranback);

      transition.initialize; // transition is the id of the canvas component
      with many children that I want the effect applied to