http://www.kirupa.com/developer/mx/ASmovement.htm
This tutorial shows me how to move 1 pixcel right/left/up/down every 25 milli-seconds which is great but I need to do something completely different.
I have drawn a grid on one layer and I have a movie clip called “test_mc” on another layer. “test_mc” is a just a square that hovers over the grid and highlights a paricular cell in the grid. I have managed to get the test_mc square moving around the grid with this code:
down.onRelease = function()
{
var bounce = 0;
// local variables
if(bounce == 0)
{
if(test_mc._y < 412.5)
{
test_mc._y += 100;
trace("bounce" + bounce);
}
else
{
bounce = 1;
test_mc._y -= 100;
trace("bounce" + bounce);
}
}
}
This code works fine.
Although I want it to bounce off the bottom and continue to go up until it gets back to square one. Its a simple problem for anyone whos a decent programmer.