# Functions assigned to escape key

**URL:** https://forum.kirupa.com/t/functions-assigned-to-escape-key/285439
**Category:** Uncategorized
**Created:** [March 31, 2009, 8:14pm UTC](https://forum.kirupa.com/t/functions-assigned-to-escape-key/285439 "2009-03-31T20:14:48Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![spyderfx](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@spyderfx](https://forum.kirupa.com/u/spyderfx)
#### Post date: [March 31, 2009, 8:14pm UTC](https://forum.kirupa.com/t/functions-assigned-to-escape-key/285439/1 "2009-03-31T20:14:48Z")

</div>

I’m having a tough time getting the escape key to use a function.

Every tutorial I go to it says that you need to

import.flash.events.KeyboardEvent

but when I use KeyBoardEvent in a function nothing happens. I get an error that says it couldn’t load

Why is this?
