I'm learning to ActionScript 3, because I thought that it has a Unity-style (i.e. smooth) movement. But instead, it is C# - style (this.x+=1;
) type of movement.
So is there a way to make your character (a circle) move smoothly in flash? or how can I write a 2-d game like haxball?
Thanks !
Asked
Active
Viewed 1,660 times
0
-
How about `this.x += 0.00001` – Paul May 24 '13 at 10:45
-
great, if it is available :) I'll try that now. – May 24 '13 at 10:57
2 Answers
1
Of course you could try to improve on the speed-factor but it might become even smoother if you try to apply a position update which is based on a timer, or amount of miliseconds that have passed. Check out this question on action script timers

Community
- 1
- 1
0
It is pretty simple to add this same movement. The velocity of the ball increases each frame with 0.1 and when you do not press anything it decreases with 0.1 Also haxball implemented a dampening of 0.99 * velocity per each frame.
You can see this in action here: Play BiluBall

Caius Miron
- 31
- 3