0 Replies Latest reply on Aug 10, 2007 3:08 PM by emadsen

    Parallel Effects, but on multiple objects?

    emadsen Level 1
      I'm essentially trying to figure out how to have two object animate at the same time. My effects and parallel object are dynamically created in AS3...

      private function slider(_target1:mx.core.Container, _target2:mx.core.Container):void{
      var slideEffectOut:mx.effects.Move = new Move(_target1);
      slideEffectOut.xBy = -320;
      slideEffectOut.duration = 500;
      var slideEffectIn:mx.effects.Move = new Move(_target2);
      slideEffectIn.xFrom = 321;
      slideEffectIn.xTo = 0;
      slideEffectIn.duration = 500;
      var slideParallelEffect = new mx.effects.Parallel();
      slideParallelEffect.addChild(slideEffectOut);
      slideParallelEffect.addChild(slideEffectIn);
      slideParallelEffect.play();
      }

      I'm trying to use this on two ViewStack children. One slides off while the other slides on, but ever since I moved all of this into a function I don't see the effects nor do I get an error.