Actionscript question

Hey,

I was wondering if anyone could tell me how I could go about fixing this problem. My code is this:

Attached to MC:
onClipEvent(load){
startPos = this._x

Attached to frame:

text1.onKeyDown = function(){
car._x=startPos

My problem is I want to have to have this code excecute when the backspace button is hit but I’m unsure about how to attach it to text1.onKeyDown = function(){?
If anyone could help it would be great.

Thanks

Kyle

on(keyPress “<Backspace>”){
car._x=startPos;
}

or you can add a listener… depends on what you want to do.

This is the code that I want to use but its not working, so I obviously need an alternative.

text3.onKeyDown “<Backspace>” = function() {
_root.car._x = startPos;

I can’t figure out another way to do this, I would appreciate it if anyone could help me with this.

Thanks

Kyle

Ice, wasnt that an alternative?

btw… when I see the post the part that says BACKSPACE is missing…


onClipEvent(keyDown){
	
	if(Key.getcode()==75){
		pressed="you did it";
	}else{
		pressed="nope";
	}
}


this is, of course, attached to a movie clip.

When I trace pressed, it says you did it when I hit K… But the principle is there. All you have to do is find the code for backspace.

pom :asian:

The code’s 8.

pom :asian: