# Ball bounce up and down 1 time

**URL:** https://forum.kirupa.com/t/ball-bounce-up-and-down-1-time/28694
**Category:** Uncategorized
**Created:** [August 16, 2003, 11:57pm UTC](https://forum.kirupa.com/t/ball-bounce-up-and-down-1-time/28694 "2003-08-16T23:57:00Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![tast](https://avatars.discourse-cdn.com/v4/letter/t/a9a28c/32.png) [@tast](https://forum.kirupa.com/u/tast)
#### Post date: [August 16, 2003, 11:57pm UTC](https://forum.kirupa.com/t/ball-bounce-up-and-down-1-time/28694/1 "2003-08-16T23:57:00Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 17, 2003, 7:53am UTC](https://forum.kirupa.com/t/ball-bounce-up-and-down-1-time/28694/2 "2003-08-17T07:53:00Z")

</div>

By the way…

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 17, 2003, 4:37pm UTC](https://forum.kirupa.com/t/ball-bounce-up-and-down-1-time/28694/3 "2003-08-17T16:37:12Z")

</div>

Did you check this: [http://www.kirupa.com/developer/actionscript/gravity.htm](http://www.kirupa.com/developer/actionscript/gravity.htm)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 17, 2003, 4:48pm UTC](https://forum.kirupa.com/t/ball-bounce-up-and-down-1-time/28694/4 "2003-08-17T16:48:48Z")

</div>

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.
