# Help with code! Please!

**URL:** <https://forum.kirupa.com/t/help-with-code-please/277537>\
**Category:** programming\
**Created:** [December 13, 2008, 6:56am UTC](https://forum.kirupa.com/t/help-with-code-please/277537 "2008-12-13T06:56:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JNAtheDUDE](https://avatars.discourse-cdn.com/v4/letter/j/f17d59/32.png) [@JNAtheDUDE](https://forum.kirupa.com/u/JNAtheDUDE)\
**Post date:** [December 13, 2008, 6:56am UTC](https://forum.kirupa.com/t/help-with-code-please/277537/1 "2008-12-13T06:56:12Z")

</div>

I need help! I have no idea where to put this:

```auto

if (speed<1 && speed>-1 && !attacking) { speed = 0; this.gotoAndStop("idle"); } if (Key.isDown(Key.UP) && !jumping) { jumping = true; } if (jumping) { this.gotoAndStop("jump"); this._y -= jump; jump -= .5; if (jump<0) { falling = true; } if (jump<-15) { jump = -15; } } 

```

In this:

```auto
onClipEvent (load) { 
speed = 0; 
maxmove = 15; 
} 
onClipEvent (enterFrame) { 
if (_root.dead) { 
this.gotoAndStop("dead"); 
} else { 
speed *= .85; 
if (speed>0) { 
dir = "right"; 
} else if (speed<0) { 
dir = "left"; 
} 
if (dir == "right"){ 
this._x += speed; 
_root._x -= speed; 
} 
if (dir == "left") { 
this._x += speed; 
_root._x -= speed; 
} 
if (Key.isDown(Key.LEFT)) { 
if (speed>-maxmove) { 
speed--; 
} 
this.gotoAndStop("run"); 
this._xscale = -100; 
} else if (Key.isDown(Key.RIGHT)) { 
if (speed<maxmove) { 
speed++; 
} 
this._xscale = 100; 
this.gotoAndStop("run"); 
} 
if (speed<1 && speed>-1 && !attacking) { 
speed = 0; 
this.gotoAndStop("idle"); 
} 
} 
} 

```

on here! [http://www.kirupa.com/developer/mx2004/platform\_game.htm](http://www.kirupa.com/developer/mx2004/platform_game.htm)

I know this is noobish, but please help me!
