Math Functions

This movie uses the sin function to make a ball bounce.

Get Adobe Flash player

Experiment: can you make the ball go from side to side instead of up and down?
Can you make it move across the stage as it bounces?

var angle:Number=0;
var distance:Number=50;
var origY:Number=ball.y;
var rate:Number=0.5;


function frames(e:Event):void {
Download the FLA file

NEXT: Eyes follow the cursor