11 Replies Latest reply on Oct 6, 2006 9:40 PM by rush_rush_q

    tween class problem

    rush_rush_q
      okay i really cant see whats wrong. seems like an error in flash but maybe theres a rule im not following or something...
      my code:

      (main timeline)

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

      mcNum = 1;
      mcStart = 880;
      mcFinish = -30;
      //image holder
      var inter = setInterval(transition,500);

      function transition(){
      mcName = "line"+mcNum;
      trace (mcName);
      mcNum++;
      mcStart = mcStart + 40;
      mcFinish = mcFinish + 40;
      var twMoveClip:Tween = new Tween(mcName, Strong.easeOut, mcStart, mcFinish, 2, true);

      if(mcNum > 5){
      clearInterval(inter);
      }
      }
      stop();

      the problem is that nothing moves. the Trace of "mcName" comes up with "line1, line2.... line 5" just like it should. However if i change mcName from >"line"+mcNum< to just >line1<. it calls line1 and makes it move. this not being my desired outcomes because none of the others move... ive been at this for hours. and it seems the tween class wont work when calling on a variable that has been added from 2 other variables or a variable and a number.

      Please help someone :(