how do you make something jump up then come down again using actionscript?heeeeeeeeeeeeellllllllllllllllllllppppppppppp!!!

Do you want it to just go up and back down, or do you want it to imitate gravity acting upon the ball so that when it hopes, gravity makes it fall again?

to just make it go up and back down again we could do a couple things

In this particular one, we’re assuming that you just want it to go up then down, then up then down, etc

Whatever object you want to hop up and down must be a movie clip.

With the action panel open, select this object and paste the following code.

//here we set a var to equal the present _y possition and a flag
//to trip whenever our object reaches max distance of travel
//This is the part that does the work
//this first if, detects if the object is at the low point
//if it is, then it moves the object one pixel upwards.
//now it detects to see if it has reached the top of the bounce
//if it has, then it sets our flag to equal up
//this else says that if the flag is not “down” then do this instead
//move the object down one pixel
//if the _y location is equal to startLoc again
//set the flag equal to down.

You can change the -30 to any negative number you like if you want to increase the height which the object bounces.

doing gravity will require a little more explination. If you’re not satisfied with how the above looks, write back and I’ll try to explain velocity/gravity to you.