6 Replies Latest reply on Feb 6, 2007 9:12 AM by Peter Lorent

    Tween class help


      I am working on understanding the Tween class, and was wondering whether somebody could explain something to me. I wrote the code below with the expectation that the image (1.jpg) would fade in, and then fade out. In fact what happens is that the image fades out only. For some reason it does not fade in, but just appears.

      Could somebody please explain why this is so and how I might go about getting the desired fade in, fade out?

      Thank you in advance.

      import mx.transitions.Tween;
      import mx.transitions.easing.*;

      createEmptyMovieClip("test_mc", getNextHighestDepth);
      loadMovie("1.jpg", test_mc);

      var photoFadeIn:Tween = new Tween(test_mc, "_alpha", Strong.easeIn, 0, 100, 1.5, true);
      var photoFadeOut:Tween = new Tween(test_mc, "_alpha", Strong.easeIn, 100, 0, 1.5, true);