1 Reply Latest reply on Oct 15, 2009 11:21 AM by RossRitchey

    choppy movement ...

    okkarne

      example.

      http://www.foodfriends.se/raps/etikett.html

       

      I have tried both tweening and actionscript. But no matter what the long line of cans are moving "choppy".

      The image is a jpg exported for web in Photoshop. And "Allow smoothing" is on.

       

      What can be done to have a smooth movement of the cans?

       

      AS I used is somethingt like this from

      http://www.flashvalley.com/fv_tutorials/updateAfterEvent/page2.php

       

      setInterval(moveSphere, 10);

      // this is our main function that will animate the ball
      function moveSphere() {
      if (greenSphere._x>220) {
      sphereDirection = "left";
      }
      if (greenSphere._x<5) {
      sphereDirection = "right";
      }
      if (sphereDirection == "right") {
      greenSphere._x += 2;
      } else {
      greenSphere._x -= 2;
      }
      // here we refresh the screen each time the function is called, in our case every 10ms
      updateAfterEvent();


      }

       

      Regards

      Olle