I started a simple movie using gravity. Check the fla file.
I'd like to know two things (initially):
1) Why does the little ball buries itself in the grass? how can I avoid it?
2) I know why if I keep pressed UP the ball flies and flies up, but I'd like to make it jump and fall... how?
PS: I know there may be lots of other posts on gravity, but Im just playing a bit and try to figure out things by my self (though Im asking for help here hehe). Anyway, I'll check those post later when Ive got the idea.
The reason the ball appears to be buried in the "grass" is because it will not stop it's downward movement until it's registration point (it's X and Y center)is lower than the "grasses" registration point. In this particular instance the author put the "grasses" registration point at the top of the shape (rather than the middle).
So basically the code is saying, "When the middle of the ball goes just below the top of the green shape, stop the ball's downward movement."
I hope this helps. I gotta go. I'll try to get back to you on your second question.
ok that was useful, however I go back to the questions:
1) Why does the little ball buries itself in the grass? how can I avoid it?
2) I know why if I keep pressed UP the ball flies and flies up, but I'd like to make it jump and fall... how?
the first one is half answered but what about the other??
never mind, I solved the jumping problem, but I still can't figure out HOW TO MAKE THE BALL STOP EXACTLY WHEN IT TOUCHES THE FLOOR I dont want it to go behind it.
Help please, check the updated *fla