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%26gt;220) {
sphereDirection = ''left'';
}
if (greenSphere._x%26lt;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
choppy movement ...
It is likely a combination of the amount of movement and the time between moves.
A better method would be to use TweenLite or another AS2 Tweening class.?They are easier to implement also;
http://blog.greensock.com/tweenliteas3/
No comments:
Post a Comment