# Whats wrong with the codes?

**URL:** <https://forum.kirupa.com/t/whats-wrong-with-the-codes/207009>\
**Category:** Uncategorized\
**Created:** [November 14, 2006, 12:40am UTC](https://forum.kirupa.com/t/whats-wrong-with-the-codes/207009 "2006-11-14T00:40:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cnboy0212](https://avatars.discourse-cdn.com/v4/letter/c/bc79bd/32.png) [@cnboy0212](https://forum.kirupa.com/u/cnboy0212)\
**Post date:** [November 14, 2006, 12:40am UTC](https://forum.kirupa.com/t/whats-wrong-with-the-codes/207009/1 "2006-11-14T00:40:37Z")

</div>

i am trying to make the character jump up using function

var jumping:Boolean = false;

function playjumps () {  
if(jumping){  
//jumping codes here  
}

Key.addListener(\_root.player);  
\_root.player.onKeyDown = function(){  
if(Key.getCode() == Key.UP){  
jumping = true;  
}else{  
jumping = false;  
}  
}

but for some reason the code doesnt work,can any 1 help me?
