# Press space once?

**URL:** <https://forum.kirupa.com/t/press-space-once/171973>\
**Category:** Uncategorized\
**Created:** [December 9, 2005, 5:24pm UTC](https://forum.kirupa.com/t/press-space-once/171973 "2005-12-09T17:24:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ErikHK](https://avatars.discourse-cdn.com/v4/letter/e/3d9bf3/32.png) [@ErikHK](https://forum.kirupa.com/u/ErikHK)\
**Post date:** [December 9, 2005, 5:24pm UTC](https://forum.kirupa.com/t/press-space-once/171973/1 "2005-12-09T17:24:10Z")

</div>

I want the parashooter in this game (attached) to jump when I press space ONCE, I don’t want to hold in space all the time as you would understand, here is the code for the parashooter:

```auto

onClipEvent(load){
speedx = 0;
time = getTimer();
time /= 100;
speedystart = 0;
}

onClipEvent(enterFrame){
	lufthast = _root.luftskepp._x/200;
	timenow = getTimer();
	timenow /= 1000;
	speedy = 9.82 * (timenow - time) + speedystart;
	
	
	
	if(Key.isDown(Key.SPACE)){
	this._y += speedy/5;
	this._x += speedx + lufthast;
	
	
	if(_y >= 700){
	_y = 700;
	_root.fallskarm.stop();
	this._x -= speedx + lufthast;
	}else{
	
	if(Key.isDown(Key.LEFT)){
		_x += 3;
	}
	
	if(Key.isDown(Key.RIGHT)){
		_x -= 3;
	}
	}
	}else{
	this._x = _root.luftskepp._x;
	this._y = _root.luftskepp._y + 100;
	}
}

```
