Bouncing Ball

January 9th, 2009
  • 100% sure it's been done before, but what the hell I'll post it anyway.

    width=550 height=400

    http://cannedlaughter.net/bounce.fla
    http://cannedlaughter.net/bounceMX.fla


    //EDIT: doesn't work in FF :(


  • here ya go.... i learned all the physics info from somewere....


  • can I see your code? I wanna see if i can use it to get my ball to stop bouncing.


  • works fine for me. =p


  • The physics is quite simple. I attached something that I did that is quite similar. The collisions are pretty bad because I haven't got around to fixing them and the variable I set for xfriction is too high. I used elastic mouse following movement rather than the setDrag method.


  • worked for me, let me see if it stops after i post...

    Any way, nice job, i especialy like the touch of telling how far above the screen the ball is.

    And about the bounce thing, i looked at your code, and ever thing seemed alright, but when i did a trace every time th bal bounced, it went down as normal. but then around 3.75 it started to only barely change, and the wierdest thing is that part of the time, the velocity went up. Maybe you should add some friction?


    EDIT strange, after reloading the page when i posted it no longer works :( good job anyways

    Thanks, I'll look into it. I'll post any results i get.


  • make it so you can grab it and throw it!


  • try www.bit-101.com/tutorials

    then try the gravity one it has an amazing ball gravity and thorwing script and well instructed tutorial


  • worked for me, let me see if it stops after i post...

    Any way, nice job, i especialy like the touch of telling how far above the screen the ball is.

    And about the bounce thing, i looked at your code, and ever thing seemed alright, but when i did a trace every time th bal bounced, it went down as normal. but then around 3.75 it started to only barely change, and the wierdest thing is that part of the time, the velocity went up. Maybe you should add some friction?


    EDIT strange, after reloading the page when i posted it no longer works :( good job anyways


  • //EDIT: doesn't work in FF :(

    Works fine for me in FF. Good job with the physics. Take a look at having the ball come to rest. It seems to get to a point and continue its x-movement with a tiny bounce indefinitely.


    // Edit: very interesting. It stopped working after I posted, as well.


  • let me quote it up for you


  • On the Screentime site they have a similar thing for windows. A red rubber ball you can toss and so, :)

    It would be fun if the ball slowed a little less quickly, :beam:


  • works fine for me also...

    Never Too Late!!! Never Too Early!!!

    n4c


  • Thanks for the comments, I am trying to make it stop bouncing, but im not having much success. Throwing will be a cool idea. I'll try that out. :)


  • not working for me.... FF user


  • i did this... its basically the same ball that ya3 has on his frontend


    I wanna redo it and have the highlight change according to its position... plus make the sprite better


  • Be sure that it is posted alot but still it is very good ...:)







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Bouncing Ball , Please add it free.