# Jumping game

**URL:** <https://forum.kirupa.com/t/jumping-game/105536>\
**Category:** Uncategorized\
**Created:** [March 27, 2004, 3:20am UTC](https://forum.kirupa.com/t/jumping-game/105536 "2004-03-27T03:20:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zeka](https://avatars.discourse-cdn.com/v4/letter/z/c6cbf5/32.png) [@zeka](https://forum.kirupa.com/u/zeka)\
**Post date:** [March 27, 2004, 3:20am UTC](https://forum.kirupa.com/t/jumping-game/105536/1 "2004-03-27T03:20:38Z")

</div>

I have built a small fla that has a jumping ball in it. when you hit control it jumps and when you hit left or right the ball goes left or right.  
Now I was trying to put this actionscript into the frame:  
right = Key.isDown(Key.RIGHT)  
left = Key.isDown(Key.LEFT)

and I was putting this actionscript on the ball:  
onClipEvent (enterFrame) {  
if (right) {  
this.\_x+=5  
}  
}  
onClipEvent(enterFrame) {  
if (left) {  
this.\_x-=5  
}  
}

and I thought It was going to work. But it didn’t. If any one can help me it would be greatly apprecitated.

\*\*EDIT Figured it out
