Any keypress event =goto next frame
I'm trying to create a keypress event that would give the impression of somebody working on a keyboard and having their document appear onscreen real time as they type. No matter what key they press, they correct letters come up. I have received code to use and have tried snippets but Animate seems buggy (or maybe I am) but it doesn't seem to work.
Basically I need any key pressed to move the playhead forward:
(snippet):
stop();
stage.addEventListener(KeyboardEvent.KEY_DOWN, fl_KeyboardDownHandler);
function fl_KeyboardDownHandler(event:KeyboardEvent):void
{
nextFrame();
}
(previous script):
stop();stage.addEventListener(KeyboardEvent.KEY_DOWN, changeSection);
function changeSection(event:KeyboardEvent):void {
nextFrame();
}
nothing occurs.
thank you in advance
