disable Enter!
Hey Guys,
I am building a tutorial on a gui application. At certain spots the trainee needs to input data then hit 'enter'. I allow it with:
hitkey=0;
onEnterFrame = function(){
hitkey=Key.isDown(13);
if(hitkey){
perform list of actions, such as goto next screen, etc.
}
}
the ascii for 'enter' is 13, so essentially, if you hit enter it goes to the next screen.
This all works. But the problem is, that it doesn't stop working. In the list of actions (above) I've tried disabling the movieclip the actionscript contains, I've tried setting _visibility to 0. I can't get it to stop, so when the trainee hits 'enter' any time after that, further into the simulation, the same function activates in the wrong part of the lesson, messing the whole thing up. How can I disable the enter key, or at least the script that waits for it?
Thanks in advance.
|