1 Reply Latest reply on Jun 6, 2013 1:26 PM by Ned Murphy

    tween in two directions?

    JonnyDL Level 1

      I am trying to create a burst using tweens, but I can't seem to get it to work. I can get the clips on the stage but I can't control them to go in different directions. What I tried:

      Generate a random number to choose a direction

       

      var posneg:Number=Math.floor(Math.random()*(1+1-11))+11;

       

      generate a random number for distance

       

      var randNum1:Number= (Math.random()*(1+75-25))+25;

       

      use posneg to choose a direction

      if(posneg<5){}

      less than 5 would got to the left, poitive would go right

       

      I cant figure how to get box_mc to tween the distance or randNum1 in one direction than the the other.

      anybody?