0 Replies Latest reply on May 17, 2006 10:46 AM by DupontDC_SPG

    Using Tween Class with multiple MovieClips Problem

    DupontDC_SPG
      Hello!

      Using the code below, and the MediaPlayback component, I am using named CuePoints that are labelled with the name of the MovieClip that I would like to have fade in and move up from 20 pixels below the mc's origin.

      All of this works just fine, but after the mp3 file completes, all of the the tweened MovieClips perform the tween all over again, in unison. How do I stop this from happening?






      import mx.transitions.Tween;
      import mx.controls.MediaPlayback;

      showObjectives = function(my_mc:String):Void
      { trace("Showing Objectives");
      var obj_mc:MovieClip = this[my_mc];
      var myStartY:Number = obj_mc._y + 20;
      var myEndY:Number = obj_mc._y;

      myTween = new Tween(obj_mc, "_y", mx.transitions.easing.Regular.easeOut, myStartY, myEndY, 2, true);
      myAlphaTween = new Tween(obj_mc, "_alpha", mx.transitions.easing.Regular.easeOut, 0, 100, 2, true);

      }

      var myPlayback:MediaPlayback;
      var myCuePointListener bject = new Object();
      myCuePointListener.cuePoint = function(eventObject bject){
      trace("heard " + eventObject.type + ", " + eventObject.target + ", " + eventObject.cuePointName + ", " + eventObject.cuePointTime);
      showObjectives(eventObject.cuePointName);
      };
      myPlayback.addEventListener("cuePoint", myCuePointListener);