PDA

View Full Version : Ball bounce up and down 1 time.



tast
August 16th, 2003, 07:57 PM
I have used this code for getting a circle going from the top and down...

Now i want it to bounce back to the top but i donīt know how to integrate it to the code.

onClipEvent(load){
myscale=290;
}
onClipEvent(enterFrame)
{
_y +=(myscale - _y)/10;
}

I want the ball to bounce down and up ONLY one time.

Can anybody help me with this?
If anyone will explain how the code works(cause iīm no good at this Action Script),- i will be glad.

tast
August 17th, 2003, 03:53 AM
By the way......

I have also been trying to make this jump to next frame when done......with no succes,- anyone know how to?

pom
August 17th, 2003, 12:37 PM
Did you check this: http://www.kirupa.com/developer/actionscript/gravity.htm

tast
August 17th, 2003, 12:48 PM
I think so.

But i think that the cool "gravity" thing keeps on bouncing.
And ActionScript is totaly new to me i donīt know how to fix it......

What i need is a ball that bounce only ONCE(up & down) and then go on to the next frame.