Highlighted

Interactive keystrokes to advance 1 keyframe at a time in the timeline for playback

Participant ,
Dec 13, 2018

Copy link to clipboard

Copied

Hello,

I'm trying to simulate typing using a series of keyframes in the the timeline.  The idea being that when the user 'types' or keys the A-Z keys, the timeline advances +1 frames for each keystroke.

I've imported my frames to the timeline and chosen "Distribute to keyframes".  I'm looking for ActionScript help to get the interactivity working?

Additionally, I don't see a good way to get script to each keyframe other than copy/pasting AS3 to 1 frame at a time.  I know there's a better way to do this part?

Thanks in advance for your help with this!

I was able to answer my own question... sharing my solution below:

I added the following script to the first keyframe of my single layer multiframe animation:

stop();

stage.addEventListener(KeyboardEvent.KEY_DOWN, fl_KeyboardDownHandler);

function fl_KeyboardDownHandler(event:KeyboardEvent):void

{

nextFrame();

}

TOPICS
Discussions

Views

55

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Interactive keystrokes to advance 1 keyframe at a time in the timeline for playback

Participant ,
Dec 13, 2018

Copy link to clipboard

Copied

Hello,

I'm trying to simulate typing using a series of keyframes in the the timeline.  The idea being that when the user 'types' or keys the A-Z keys, the timeline advances +1 frames for each keystroke.

I've imported my frames to the timeline and chosen "Distribute to keyframes".  I'm looking for ActionScript help to get the interactivity working?

Additionally, I don't see a good way to get script to each keyframe other than copy/pasting AS3 to 1 frame at a time.  I know there's a better way to do this part?

Thanks in advance for your help with this!

I was able to answer my own question... sharing my solution below:

I added the following script to the first keyframe of my single layer multiframe animation:

stop();

stage.addEventListener(KeyboardEvent.KEY_DOWN, fl_KeyboardDownHandler);

function fl_KeyboardDownHandler(event:KeyboardEvent):void

{

nextFrame();

}

TOPICS
Discussions

Views

56

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Dec 13, 2018 0
Participant ,
Dec 13, 2018

Copy link to clipboard

Copied

I was able to answer my own question... sharing my solution below:

I added the following script to the first keyframe of my single layer multiframe animation:

stop();

stage.addEventListener(KeyboardEvent.KEY_DOWN, fl_KeyboardDownHandler);

function fl_KeyboardDownHandler(event:KeyboardEvent):void

{

nextFrame();

}

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 13, 2018 1