Collision

 

A collision happens when two separate shapes share one or more points in space. An example of a simple collision is a mouseover on a movie clip or button. A more complicated collision example would be when a ball bounces off an angled line.

 Momentum

When two objects collide, the momentum (=mass*velocity) affected is the component that lies along the line of action.

 Flash Examples 

 Movieclip-Movieclip Collisions
Open the example file - movieclip_movieclip.fla where shape1 moves to the right and during every frame it checks to see if there is a collision occurring between shape1 and shape2, and returns a trace action.

 Movieclip-Point Collisions
Run the example file - ball_falling.fla where you check to see if the ball hits the floor.
Open the example file in Flash

 Clip-Point Collisions
Run the example file - balloon_pop.fla to determine if the mouse clicks over the balloon, and to"explode"
Open the example file in Flash
Run the example file - balloon_pop_many.fla for more balloons.
Open the example file in Flash

 Shape-Point Collisions
Run the example file - puzzle_piece.fla using shape-point collision
Open the example file in Flash
Run the example file - puzzle_piece.fla that lets you drag the puzzle piece
Open the example file in Flash

 Point-Circle Collisions
Run the example file
Open the example file in Flash

 Circle-Circle Collisions
Run the example file
Open the example file in Flash

 Line-Line Collisions
Run the example file
Open the example file in Flash

 Circle-Line Collisions
Run the example file
Open the example file in Flash

 Point-Rectangle Collisions
Run the example file
Open the example file in Flash

 Rectangle-Rectangle Collisions
Run the example file
Open the example file in Flash

 Game Review

Shuffle Deck - No graphics, just a function that handles taking a deck of cards in memory and randomly shuffling it in the fastest possible way.

 Reading

  Flash mx Game Design Demystified: Chapter 5