KeyDown Help

Hi everyone.

I’m a little bit new to advanced actionscripting so I was wondering if I could get a little guidance.

I’m currently making a site that uses a keydown function and said key is the space bar. However I hit a bit of a snag today when I was making an email flash form and realised that when you type the keydown action I have on my menu goes a little insane. I was wondering if there is a way to turn off the keydown function when that email forum opens up and then once you hit “send” it turns the keydown function back on?

I’m trying my best to wing this! It would of course help if I had a clue how to think code up on the spot but I dont. If anyone can identify from this following code what I am trying to achieve I would be so grateful if they can help me achieve it with success…


onClipEvent (keyDown) {
	if (Key.getCode() == 32) {
		play();
		_root.looper.start()
		if (_root.homescreen.loaded("contact.swf")) {
			
			
			this.worldmc.stop();
			
		}
	}
}

So when my screen loads the external swf called “contact” I want the movie that is controlled by the spacebar keydown function to stop, so it doesnt play everytime spacebar is hit whilst typing a message. Or is there a bit of code that stops a keyDown event happening when within an input text field??

:-/