# Function help.... AGAIN

**URL:** <https://forum.kirupa.com/t/function-help-again/124824>\
**Category:** Uncategorized\
**Created:** [October 7, 2004, 3:28am UTC](https://forum.kirupa.com/t/function-help-again/124824 "2004-10-07T03:28:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoMan](https://avatars.discourse-cdn.com/v4/letter/j/2bfe46/32.png) [@JoMan](https://forum.kirupa.com/u/JoMan)\
**Post date:** [October 7, 2004, 3:28am UTC](https://forum.kirupa.com/t/function-help-again/124824/1 "2004-10-07T03:28:56Z")

</div>

Ok, so far, the jumping is working, but now the other function wont work! I have tried everything in my power to fix this, but it wont work. If any one has any suggestions or help, it would be very helpful. Thanks. Oh, and here is my code:

```php
 Scrolling();
Moving();
StartGame();
Dying();
function StartGame() {
 move = true;
 xspeed = 2;
 vel_y = 0;
 jumping = false;
 _root.onEnterFrame = Moving;
}
function Moving() {
 if (Key.isDown(Key.RIGHT) && move) {
  hero.gotoAndStop("run");
 } else if (Key.isDown(Key.LEFT) && move) {
  hero.gotoAndStop("run");
 } else {
  hero.gotoAndStop("edle");
 }
 if (Key.isDown(Key.UP) && !jumping) {
  hero.gotoAndStop("jump");
  vel_y = 20;
  jumping = true;
 }
 if (jumping == true) {
  vel_y -= 1;
  if (vel_y<=-20) {
   vel_y = -20;
  }
  hero._y -= vel_y;
 }
}
function Dying() {
 if (hero.sword.hitTest(enemy)) {
  enemy.gotoAndStop("dead");
  score += 5;
 }
}
 

```

peace
