# More Precise

**URL:** https://forum.kirupa.com/t/more-precise/23916
**Category:** flash
**Created:** [June 24, 2003, 7:56am UTC](https://forum.kirupa.com/t/more-precise/23916 "2003-06-24T07:56:48Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![scarce](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@scarce](https://forum.kirupa.com/u/scarce)
#### Post date: [June 24, 2003, 7:56am UTC](https://forum.kirupa.com/t/more-precise/23916/1 "2003-06-24T07:56:48Z")

</div>

Alright, I’m trying to make a little controlable sprite character. When I push Down on the keyboard I want it to go to frame 1 and play, when I release, i want it to go to frame 1 and stop. When I push up, I want it to go to frame 9 and play, when I release I want it to go to frame 9 and stop, how can this be down? (Sorry to the last guy who replied to my post, it didn’t work so I’m asking in a different way:/)☹

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 24, 2003, 8:21am UTC](https://forum.kirupa.com/t/more-precise/23916/2 "2003-06-24T08:21:43Z")

</div>

untested…

```auto
var frame, playing;
myMovieClip.onKeyDown = function() {
	if (!playing) {
		frame = this._currentframe;
		if (Key.isDown(40)) this.gotoAndPlay(1);
		if (Key.isDown(38)) this.gotoAndPlay(9);
		playing = true;
	}
};
myMovieClip.onKeyUp = function() {
	this.gotoAndStop(frame);
	playing = false;
};
Key.addListener(myMovieClip);

```
