Welcome Guest (Log in)

Bouncing balls

Expander triangle
  • Author
  • Rating
  • Type
  • Revision
  • Downloaded
  • Updated
  • dev@livecode.com
  • StarStarStarStarStar
  • Stack
  • 5
  • 13893 Times
  • 01 August 2014
Bouncing balls
This stack demonstrates how to create a number of graphics representing bouncing balls.

Each ball is given a random starting direction and a loop is used to calculate the new position of each ball on each iteration of the loop, taking into account the edges of the stack, gravity and friction.

The user can create new balls by clicking on the stack and can agitate the balls by shaking a mobile device, on desktop platforms a shake can be simulated by clicking a button.
Ajax Loader
Expander triangle
    User Comments
    Expander triangle