4 Replies Latest reply on May 30, 2007 1:52 PM by Germ77

    second tween does not wait for first to finish

    Germ77 Level 1
      Having a little problem here and as far as I can tell it is just that the second tween starts before waiting for the first to finish. Basically on a click event it should slide out a scroll pane to the bottom of the screen, change the contentpath of the scroll pane, then slide it back up.

      with the code below it just slides up the new movie clip but does not slide out the old one, if i remove the code for the new clip to slide up the old one does do the slide out how I want it to look.

      how can I make a pause in between the two to wait.

      on (press) {
      import mx.transitions.Tween;
      import mx.transitions.easing.*;

      _root.mask._x = 54;
      _root.mask._y = 109.3;


      switch (_root.loaded_clip)
      case 2: var Slide_out:Tween = new Tween(_root.scroll_pane, "_y", Bounce.easeOut, _root.scroll_pane._y, 900, 3, true); break;

      _root.scroll_pane.contentPath = "Search_mc";

      var Slide_up:Tween = new Tween(_root.scroll_pane, "_y", Bounce.easeOut, 900, 109, 3, true);
      _root.loaded_clip = 1;