title: AS3: Car movement speed
body: <p>I'm beginer in AS3. I'm working follow a tutorial frogger game, you can view full code at here <a href="http://www.makeflashgames.com/tutorialsplus/tutorial-frogger.php" rel="nofollow">http://www.makeflashgames.com/tutorialsplus/tutorial-frogger.php</a>. At Function startGame(), I know "speedX" is moving speed of the car in the direction of X. I try to change speedX to speedY, but nothing happen, the car just dose not move. Please help me write a function to moving the car follow X and Y. Or please help me make it clear...Thanks :)</p>
  
  <pre><code>public function startGame()
      {           
          timeElapsed = 0;
          totalTimer = 99;
          life = 3;
          p1speedX = 0;
          p1speedY = 0;
          gotoWin = false;
          gotoLose = false;
          standingOnLog = false;
          cars = new Array();
          logs = new Array();
          homes = new Array();
          logsYPos = new Array(115,165,215,265);
          carsYPos = new Array(365,415,465,515);
  
          setupGame();
  
          //Spawn Cars
          //Row 1
          for (var i=1; i&lt;=2; i++)
          {
              var newCar = new Car();
              newCar.x = -300 * i;
              newCar.y = carsYPos[0];
              newCar.speedX = 150;
              cars.push(newCar);
              addChild(newCar);
          }
  
          //Row 2
          for (var i=1; i&lt;=3; i++)
          {
              var newCar = new Car();
              newCar.x = (170 * i) + 500;
              newCar.y = carsYPos[1];
              newCar.speedX = -5;
              cars.push(newCar);
              addChild(newCar);
          }
  
          //Row 3
          for (var i=1; i&lt;=3; i++)
          {
              var newCar = new Car();
              newCar.x = (-220 * i) + 100;
              newCar.y = carsYPos[2];
              newCar.speedX = 8;
              cars.push(newCar);
              addChild(newCar);
          }
  
          //Row 4
          for (var i=1; i&lt;=3; i++)
          {
              var newCar = new Car();
              newCar.x = (200 * i) + 350;
              newCar.y = carsYPos[3];
              newCar.speedX = -5;
              cars.push(newCar);
              addChild(newCar);
          }
  </code></pre>