Menu

onEnd event in Parallel

Help
2005-06-01
2013-04-01
  • Tianzhen Lin

    Tianzhen Lin - 2005-06-01

    Hi, thanks for the link to AnimationPackage 1.06 Beta 1, many features seem to work as expected, except that I realize "onEnd" event does not seem to fire from Parallel but it seems to work in Move or Shake.  I always use .addEventListener to subscribe to an event instead of passing a callback function.

    Thanks!

     
    • Alex Uhlmann

      Alex Uhlmann - 2005-06-01

      definitely a good idea to use EventDispatcher instead of callbacks.

      Parallel works for me with this code:

      var myMoveOnQuadCurve:MoveOnQuadCurve = new MoveOnQuadCurve(mc,100,100,300,300,500,100);
      var myScale:Scale = new Scale(mc,50,50);
      var myRotation:Rotation = new Rotation(mc,360);
      var myColorTransform:ColorTransform = new ColorTransform(mc,0xff0000,50);

      var myParallel:Parallel = new Parallel();
      myParallel.addChild(myMoveOnQuadCurve);
      myParallel.addChild(myScale);
      myParallel.addChild(myRotation);
      myParallel.addChild(myColorTransform);
      myParallel.animationStyle(2000,Circ.easeInOut);
      myParallel.addEventListener("onEnd",this);
      myParallel.animate(0,100);
      function onEnd(e:Object) {   
          trace("onEnd")
      }

      could you post your code for comparsion.

      Best,
      Alex

       

Log in to post a comment.