4 Replies Latest reply on May 18, 2009 12:24 PM by Ned Murphy

    Dynamic MovieClip Names

    wkirklutz Level 1

      I have an array that houses the names of six movieclips. I randomly select three of them. I am trying to get my randomly chosen movieClips to do what I want them to do. I have tried the following code to get the first to fade in:



      // import tween classes

      import mx.transitions.Tween;

      import mx.transitions.easing.*;


      var FirstPersonAnimation:Object;



      FirstPersonAnimation = new Tween("mc"+[_global.FirstPerson], "_alpha", Regular.easeInOut, 0, 100, _global.FadeInTime, true);

      FirstPersonAnimation.onMotionFinished = function() {




      But it does not work. The trace comes back with the full movie clip name ex: mcTom, but even though that value comes up in the trace, the AS doesn't see it as a movie clip. Any thoughts on how I can correct this?