A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: understanding gravity

  1. #1
    SeniorMember yet almost newbie deniel87's Avatar
    Join Date
    Oct 2001
    Posts
    202

    understanding gravity

    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.
    Attached Files Attached Files
    Thanks for helping

  2. #2
    Junior Member
    Join Date
    Apr 2003
    Location
    Southern CA
    Posts
    10
    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.

    -Tim

  3. #3
    SeniorMember yet almost newbie deniel87's Avatar
    Join Date
    Oct 2001
    Posts
    202

    thanks

    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??
    Thanks for helping

  4. #4
    SeniorMember yet almost newbie deniel87's Avatar
    Join Date
    Oct 2001
    Posts
    202

    help!!!!!!

    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
    Attached Files Attached Files
    Thanks for helping

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center