Showing posts with label events. Show all posts
Showing posts with label events. Show all posts

Wednesday, November 4, 2009

Step 7 - Adding Keyboard Events

So, I was able to make the keyboard events work fairly easily at first but then I ran into problems. I tried to add another keyboard event using the enter key a second time and BOOM! There were 2 things in my code listening for the enter key and each tried to execute when that key was hit. I tried everything I could think of to make it work right. I tried the currentFrame command but that didn't seem to help either (I'm sure I probably just wasn't doing it right). Finally, I tried just removing the listener after it had fired but this too failed. So, the file I have loaded, if you click play and then enter your name, you can press the enter key on the keyboard and it will advance to the next screen.

I'd give myself an 8.5 out or 10 because I got the actual keyboard event to work and if I was staying on the same frame or using a different key I would not have encountered the problem I did. Also, the fact that I spent quite a bit of time exploring online how to do this and trying different methods over and over again has value as well.

Here's teh link: http://dlrstudios.net/ipt/560assignments/HEINOUS%20HEIST.html